% \iffalse meta-comment
%<*internal>
\iffalse
%</internal>
%<*readme>
achemso - Support for submissions to American Chemical Society journals
=======================================================================

The `achemso` bundle provides a LaTeX class file and BibTeX
style file in accordance with the requirements of the American
Chemical Society (ACS). The files can be used for any documents,
but have been carefully designed and tested to be suitable for
submission to ACS journals.

The bundle also includes the `natmove` package. This package is
loaded by `achemso`, and provides automatic moving of
superscript citations after punctuation.

Installation
------------

The package is supplied in `.dtx` format and as a pre-extracted
`.zip` file, `achemso.tds.zip`. The later is most convenient for
most users: simply unzip this in your local `texmf` directory.
If you want to unpack the `.dtx` yourself, running `tex
achemso.dtx` will extract the package whereas `latex
achemso.dtx` will extract it and also typeset the documentation.

Typesetting the documentation requires a number of packages in
addition to those needed to use the package. This is mainly
because of the number of demonstration items included in the
text. To compile the documentation without error, you will
need the packages:
 - `array`
 - `booktabs`
 - `hypdoc`
 - `listings`
 - `lmodern`
 - `mathpazo`
 - `microtype`
%</readme>
%<*internal>
\fi
\def\nameofplainTeX{plain}
\ifx\fmtname\nameofplainTeX\else
  \expandafter\begingroup
\fi
%</internal>
%<*install>
\input docstrip.tex
\keepsilent
\askforoverwritefalse
\preamble
----------------------------------------------------------------
achemso --- Support for submissions to American Chemical Society
  journals
E-mail: joseph.wright@morningstar2.co.uk
Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt
----------------------------------------------------------------

\endpreamble
\postamble

Originally developed by Mats Dahlgren
Copyright (C) 1996-1998 by Mats Dahlgren
Copyright (C) 2008-2013 by
  Joseph Wright <joseph.wright@morningstar2.co.uk>
 
Part of this bundle is derived from cite.sty, to which the
following license applies:
  Copyright (C) 1989-2009 by Donald Arseneau
  These macros may be freely transmitted, reproduced, or
  modified provided that this notice is left intact.

It may be distributed and/or modified under the conditions of
the LaTeX Project Public License (LPPL), either version 1.3c of
this license or (at your option) any later version.  The latest
version of this license is in the file:

   http://www.latex-project.org/lppl.txt

This work is "maintained" (as per LPPL maintenance status) by
  Joseph Wright.

This work consists of the file  achemso.dtx
          and the derived files achemso.cls,
                                achemso.ins,
                                achemso.pdf,
                                achemso.sty,
                                achemso-demo.bib,
                                achemso-demo.tex,
                                natmove.sty and
                                a number of configuration files.
                               
\endpostamble
\usedir{tex/latex/achemso}
\generate{
  \file{\jobname.cls}{\from{\jobname.dtx}{class}}
  \file{\jobname.sty}{\from{\jobname.dtx}{package}}
  \file{natmove.sty}{\from{\jobname.dtx}{natmove}}
}
\usedir{tex/latex/achemso/config}
\generate{\file{aamick.cfg}{\from{\jobname.dtx}{aamick}}
          \file{acbcct.cfg}{\from{\jobname.dtx}{acbcct}}
          \file{accacs.cfg}{\from{\jobname.dtx}{accacs}}
          \file{achre4.cfg}{\from{\jobname.dtx}{achre4}}
          \file{acncdm.cfg}{\from{\jobname.dtx}{acncdm}}
          \file{acsccc.cfg}{\from{\jobname.dtx}{acsccc}}
          \file{amlccd.cfg}{\from{\jobname.dtx}{amlccd}}
          \file{amclct.cfg}{\from{\jobname.dtx}{amclct}}
}
\generate{\file{ancac3.cfg}{\from{\jobname.dtx}{ancac3}}
          \file{ancham.cfg}{\from{\jobname.dtx}{ancham}}
          \file{apchd5.cfg}{\from{\jobname.dtx}{apchd5}}
          \file{ascecg.cfg}{\from{\jobname.dtx}{ascecg}}
          \file{asbcd6.cfg}{\from{\jobname.dtx}{asbcd6}}
          \file{bichaw.cfg}{\from{\jobname.dtx}{bichaw}}
          \file{bcches.cfg}{\from{\jobname.dtx}{bcches}}
          \file{bomaf6.cfg}{\from{\jobname.dtx}{bomaf6}}
}
\generate{\file{bipret.cfg}{\from{\jobname.dtx}{bipret}}
          \file{crtoec.cfg}{\from{\jobname.dtx}{crtoec}}
          \file{chreay.cfg}{\from{\jobname.dtx}{chreay}}
          \file{cmatex.cfg}{\from{\jobname.dtx}{cmatex}}
          \file{cgdefu.cfg}{\from{\jobname.dtx}{cgdefu}}
          \file{enfuem.cfg}{\from{\jobname.dtx}{enfuem}}
          \file{esthag.cfg}{\from{\jobname.dtx}{esthag}}
          \file{estlcu.cfg}{\from{\jobname.dtx}{estlcu}}
}
\generate{\file{iecred.cfg}{\from{\jobname.dtx}{iecred}}
          \file{inoraj.cfg}{\from{\jobname.dtx}{inoraj}}
          \file{jacsat.cfg}{\from{\jobname.dtx}{jacsat}}
          \file{jafcau.cfg}{\from{\jobname.dtx}{jafcau}}
          \file{jceaax.cfg}{\from{\jobname.dtx}{jceaax}}
          \file{jceda8.cfg}{\from{\jobname.dtx}{jceda8}}
          \file{jcisd8.cfg}{\from{\jobname.dtx}{jcisd8}}
          \file{jctcce.cfg}{\from{\jobname.dtx}{jctcce}} 
}
\generate{\file{jmcmar.cfg}{\from{\jobname.dtx}{jmcmar}}
          \file{jnprdf.cfg}{\from{\jobname.dtx}{jnprdf}}
          \file{joceah.cfg}{\from{\jobname.dtx}{joceah}}
          \file{jpcafh.cfg}{\from{\jobname.dtx}{jpcafh}}
          \file{jpcbfk.cfg}{\from{\jobname.dtx}{jpcbfk}}  
          \file{jpccck.cfg}{\from{\jobname.dtx}{jpccck}} 
          \file{jpclcd.cfg}{\from{\jobname.dtx}{jpclcd}}    
          \file{jprobs.cfg}{\from{\jobname.dtx}{jprobs}}
}
\generate{\file{langd5.cfg}{\from{\jobname.dtx}{langd5}}
          \file{mamobx.cfg}{\from{\jobname.dtx}{mamobx}}
          \file{mpohbp.cfg}{\from{\jobname.dtx}{mpohbp}}
          \file{nalefd.cfg}{\from{\jobname.dtx}{nalefd}}
          \file{orlef7.cfg}{\from{\jobname.dtx}{orlef7}}
          \file{oprdfk.cfg}{\from{\jobname.dtx}{oprdfk}}
          \file{orgnd7.cfg}{\from{\jobname.dtx}{orgnd7}}
}
\usedir{bibtex/bst/achemso}
\generate{
  \file{achemso.bst}{\from{\jobname.dtx}{bst}}
  \file{biochem.bst}{\from{\jobname.dtx}{bst,bio}}
}
%</install>
%<install>\endbatchfile
%<*internal>
\usedir{source/latex/achemso}
\generate{
  \file{\jobname.ins}{\from{\jobname.dtx}{install}}
}
\nopreamble\nopostamble
\usedir{doc/latex/achemso}
\generate{
  \file{README.txt}{\from{\jobname.dtx}{readme}}
  \file{achemso-demo.tex}{\from{\jobname.dtx}{demo}}
  \file{achemso-demo.bib}{\from{\jobname.dtx}{bib}}
}
\ifx\fmtname\nameofplainTeX
  \expandafter\endbatchfile
\else
  \expandafter\endgroup
\fi
%</internal>
%<*package|class|natmove>
\NeedsTeXFormat{LaTeX2e}
%</package|class|natmove>
%<*driver>
\documentclass[a4paper]{ltxdoc}
\usepackage{achemso,array,booktabs,lmodern}
\usepackage[osf]{mathpazo}
\usepackage[scaled=0.95]{helvet}
\usepackage[final]{listings,microtype}
\usepackage[T1]{fontenc}
\usepackage[numbered]{hypdoc}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
%\GetFileInfo{\jobname.sty}
%
%\makeatletter
%
%^^A \DescribeOption is in l3doc but not ltxdoc
%\newcommand*\DescribeOption{^^A
%  \leavevmode
%  \@bsphack
%  \begingroup
%    \MakePrivateLetters
%    \Describe@Option
%}
%\newcommand*\Describe@Option[1]{^^A
%    \endgroup
%  \marginpar{^^A
%    \raggedleft
%    \PrintDescribeEnv{#1}^^A
%  }%
%  \SpecialOptionIndex{#1}^^A
%  \@esphack
%  \ignorespaces
%}
%\newcommand*\SpecialOptionIndex[1]{^^A
%  \@bsphack
%  \index{^^A
%    #1\actualchar{\protect\ttfamily#1} (option)\encapchar usage^^A
%  }^^A
%  \index{^^A
%    options:\levelchar#1\actualchar{\protect\ttfamily#1}
%    \encapchar usage^^A
%  }^^A
%  \@esphack
%}
%
%^^A For creating examples with nice highlighting of code, and so
%^^A on; based on the system used in the listings source (lstsample).
%\lst@RequireAspects{writefile}
%\newsavebox{\LaTeXdemo@box}
%\lstnewenvironment{LaTeXdemo}[1][code and example]{^^A
%  \global\let\lst@intname\@empty
%  \expandafter\let\expandafter\LaTeXdemo@end
%    \csname LaTeXdemo@#1@end\endcsname
%  \@nameuse{LaTeXdemo@#1}^^A
%}{^^A
%  \LaTeXdemo@end
%}
%\newcommand*\LaTeXdemo@new[3]{^^A
%  \expandafter\newcommand\expandafter*\expandafter
%    {\csname LaTeXdemo@#1\endcsname}{#2}^^A
%  \expandafter\newcommand\expandafter*\expandafter
%    {\csname LaTeXdemo@#1@end\endcsname}{#3}^^A
%}
%\newcommand*\LaTeXdemo@common{^^A
%  \setkeys{lst}{
%    basicstyle   = \small\ttfamily,
%    basewidth    = 0.51em,
%    gobble       = 3,
%    keywordstyle = \color{blue},
%    language     = [LaTeX]{TeX},
%    moretexcs    = {
%      affiliation,
%      alsoaffiliation,
%      altaffiliation,
%      email,
%      fax,
%      natmovechars,
%      phone,
%      setkeys
%    }
%  }^^A
%}
%\newcommand*\LaTeXdemo@input{^^A
%  \MakePercentComment
%  \catcode`\^^M=10\relax
%  \small
%  \begingroup
%    \setkeys{lst}{
%      SelectCharTable=\lst@ReplaceInput{\^\^I}{\lst@ProcessTabulator}
%    }^^A
%    \leavevmode
%      \input{\jobname.tmp}^^A
%  \endgroup
%  \MakePercentIgnore
%}
%\LaTeXdemo@new{code and example}{^^A
%  \setbox\LaTeXdemo@box=\hbox\bgroup
%    \lst@BeginAlsoWriteFile{\jobname.tmp}^^A
%    \LaTeXdemo@common
%}{^^A
%    \lst@EndWriteFile
%  \egroup
%  \begin{center}
%    \ifdim\wd\LaTeXdemo@box>0.48\linewidth\relax
%      \hbox to\linewidth{\box\LaTeXdemo@box\hss}^^A
%        \begin{minipage}{\linewidth}
%          \LaTeXdemo@input
%        \end{minipage}
%    \else
%      \begin{minipage}{0.48\linewidth}
%        \LaTeXdemo@input
%      \end{minipage}
%      \hfill
%      \begin{minipage}{0.48\linewidth}
%        \hbox to\linewidth{\box\LaTeXdemo@box\hss}^^A
%      \end{minipage}
%    \fi
%  \end{center}
%}
%\LaTeXdemo@new{code only}{^^A
%  \LaTeXdemo@common
%}{^^A
%}
%
%\providecommand*\eTeX{\ensuremath{\varepsilon}-\TeX}
%\providecommand*\file{\texttt}
%\providecommand*\opt{\texttt}
%\providecommand*\pkg{\textsf}
%
%\newcommand*\ACS{\textsc{acs}}
%
%\makeatother
%
%\title{^^A
%  \textsf{achemso} --- Support for submissions to American Chemical
%    Society journals\thanks{^^A
%    This file describes version \fileversion, last revised
%    \filedate.^^A
%  }^^A
%}
%\author{^^A
%  Joseph Wright\thanks{E-mail: joseph.wright@morningstar2.co.uk}^^A
%}
%\date{Released \filedate}
%
%\maketitle
%
% \changes{v1.0}{1998/06/01}{Initial release of package by Mats Dahlgren}
% \changes{v2.0}{2007/01/17}{Re-write of package by Joseph Wright}
% \changes{v3.0}{2008/07/20}{^^A
%   Second re-write, converting to a class and giving much tighter
%   integration with \textsc{acs} submission system^^A
% }
% \changes{v3.1}{2009/04/21}{^^A
%   Re-ordered code to reduce or remove dependency on other packages^^A
% }
% \changes{v3.1}{2008/11/08}{Added \cs{alsoaffiliation} macro}
% \changes{v3.2}{2009/04/20}{^^A
%   New functions \cs{SectionsOff}, \cs{SectionsOn},
%   \cs{SectionNumbersOff} and \cs{SectionNumbersOn}
% }
% \changes{v3.2}{2009/04/21}{New \texttt{tocentry} section}
% \changes{v3.2}{2009/04/20}{^^A
%   New functions \cs{AbstractOff} and \cs{AbstractOn}^^A
% }
% \changes{v3.2c}{2009/05/29}{Added \cs{fax} macro}
% \changes{v3.2c}{2009/05/29}{Added \cs{phone} macro}
% \changes{v3.2b}{2009/05/05}{New \texttt{email} option}
% \changes{v3.2c}{2009/05/28}{Fix so that \texttt{email} option is turned
%   on by default}
% \changes{v3.3}{2008/08/28}{\cs{altaffiliation} macro checks for
%   duplicate entries and uses only one footnote}
% \changes{v3.3}{2009/08/28}{New \texttt{layout} option}
% \changes{v3.3a}{2009/09/01}{New \texttt{etalmode} option}
% \changes{v3.4}{2010/01/15}{More detail on installation}
% \changes{v3.5}{2010/06/25}{New \BibTeX{} style file}
% \changes{v3.5a}{2010/08/05}{Modify JACS Communication to print
%   abstract}
% \changes{v3.5c}{2010/10/11}{Update \emph{Org.~Lett.}\ style}
% \changes{v3.5c}{2010/10/11}{Bug fix for \cs{mciteSubRef} macro}
% \changes{v3.4}{2010/01/15}{Require \pkg{cleveref}, dropping
%   \pkg{varioref} use}
% \changes{v3.6}{2012/01/11}{Drop \pkg{cleverref} use}
% \changes{v3.7}{2012/04/30}{Rename \opt{usetitle} option to
%   \opt{articletitle}}
% \changes{v3.7}{2012/04/30}{New \opt{chaptertitle} option for bibliography}
% \changes{v3.8}{2013/08/23}{Extend journal list to current ACS range}
% \changes{v3.8}{2013/08/16}{Introduce \cs{latin} command to support
%   \emph{ACS Nano} requirements}
%
%\begin{abstract}
% The \pkg{achemso} bundle provides a \LaTeX\ class file and \BibTeX\
% style file in accordance with the requirements of the American
% Chemical Society (\ACS).  The files can be used for any documents, but
% have been carefully designed and tested to be suitable for submission
% to \ACS\ journals.
%
% The bundle also includes the \pkg{natmove} package.  This package is
% loaded by \pkg{achemso}, and provides automatic moving of superscript
% citations after punctuation.
%\end{abstract}
%
%\begin{multicols}{2}
%  \tableofcontents
%\end{multicols}
%
%\section{Introduction}
% Support for \BibTeX\ bibliography following the requirements of the
% American Chemical Society (\ACS), along with a package to make
% these easy to  have been available since version one of \pkg{achemso}.
% The re-write from version 1 to version 2 made a number of
% improvements to the package, and also added a number of new
% features.  However, neither version one nor version two of the
% package was targeted directly at use for submissions to \ACS\
% journals.  This new release of \pkg{achemso} addresses this issue.
%
% The bundle consists of four parts.  The first is a \LaTeXe\ class,
% intended for use in submissions.  It is based on the standard
% \pkg{article} class, but makes various changes to facilitate ease
% of use.  The second part is the \LaTeX\ package.  The package contains
% the parts of the bundle which are appropriate for use with other
% document classes.\footnote{For example, when writing a thesis.} 
% Thirdly, two \BibTeX\ style files are included.  These are used by
% both the class and the package, but can be used directly if desired.
% Finally, an example document is included; this is intended to act a
% potential template for submission, and illustrates the use of the
% class file.
%
%\section{Installation}
%
% The package is supplied in \file{dtx} format and as a pre-extracted
% zip file, \file{\jobname.tds.zip}. The later is most convenient for
% most users: simply unzip this in your local texmf directory and
% run \texttt{texhash} to update the database of file locations. If
% you want to unpack the \file{dtx} yourself, running
% \texttt{tex \jobname.dtx} will extract the package whereas
% \texttt{latex \jobname.dtx} will extract it and also typeset the
% documentation.
%
% Typesetting the documentation requires a number of packages in
% addition to those needed to use the package. This is mainly
% because of the number of demonstration items included in the text. To
% compile the documentation without error, you will need the packages:
% \begin{itemize}
%   \item \pkg{array}
%   \item \pkg{booktabs}
%   \item \pkg{hypdoc}
%   \item \pkg{listings}
%   \item \pkg{lmodern}
%   \item \pkg{mathpazo}
%   \item \pkg{microtype}
%\end{itemize}
%
%\section{Requirements}
%
% The \pkg{achemso} class requires the following packages:
%\begin{itemize}
%  \item \pkg{caption}
%  \item \pkg{float}
%  \item \pkg{geometery}
%  \item \pkg{natbib}
%  \item \pkg{setspace}
%  \item \pkg{xkeyval}
%\end{itemize}
% These are normally present in the current major \TeX{} distributions,
% but are also available from \href{http://www.ctan.org}{The
% Comprehensive TeX Archive Network}.
%
%\section{The class file}
% The class file has been designed for use in submitting journals to
% the \ACS. It uses all of the modifications described here (those in
% the package as well as those in the class).  The accompanying
% example manuscript can be used as a template for the correct use of
% the class file.  It is intended to act as a model for submission.
%
% When submitting communications to \emph{J.~Am.\ Chem.\ Soc.}, the
% class will automatically lay the document out in the publication
% style. This allows the author to judge the length of text submitted
% more accurately.  Changing the \opt{manuscript} in the
% demonstration document to \opt{communication} will illustrate the
% effect.
%
%\subsection{Class options}
%
%\DescribeOption{journal}
% The class supports a limited number of options, which are
% specifically-targeted at submission.  The class uses the
% \pkg{keyval} system for options, in the form \opt{key=value}. The
% most important option is \opt{journal}.  This is the name of the
% target journal for the publication.  The package is designed such
% that the choice of journal will set up the correct bibliography
% style and so on.  The journals currently recognised by the package
% are summarised in Table~\ref{tab:journal}.  If an unknown journal
% is specified, the package will fall-back on the
% \opt{journal=jacsat} option.
%\begin{table}
%  \centering
%  \begin{tabular}{@{}>{\itshape}l>{\ttfamily}l>{\itshape}l>{\ttfamily}l@{}}
%    \toprule
%      Journal & \rmfamily Setting & Journal & \rmfamily Setting \\
%    \midrule
%      ACS Appl.\ Mater.\ Interfaces   & aamick &
%      Ind.\ Eng.\ Chem.\ Res.         & iecred \\
%      ACS Chem.\ Biol.                & acbcct &
%      Inorg.\ Chem.                   & inoraj \\
%      ACS Catal.                      & accacs &
%      J.~Agric.\ Food Chem.           & jafcau \\
%      Acc.\ Chem.\ Res.               & achre4 &
%      J.~Chem.\ Eng.\ Data            & jceaax \\
%      ACS Chem.\ Neurosci.            & acncdm &
%      J.~Chem.\ Ed.                   & jceda8 \\
%      ACS Combinatorial Sci.          & acsccc &
%      J.~Chem.\ Inf.\ Model.          & jcisd8 \\
%      ACS Macro Lett.                 & amlccd &
%      J.~Chem.\ Theory Comput.        & jctcce \\
%      ACS Med.\ Chem.\ Lett.          & amclct &
%      J.~Med.\ Chem.                  & jmcmar \\
%      ACS Nano                        & ancac3 &
%      J.~Nat.\ Prod.                  & jnprdf \\
%      ACS Photon.                     & apchd5 &
%      J.~Org.\ Chem.                  & joceah \\
%      ACS Sustainable Chem.\ Eng.     & ascecg &
%      J.~Phys.\ Chem.~A               & jpcafh \\
%      ACS Synth.\ Biol.               & asbcd6 &
%      J.~Phys.\ Chem.~B               & jpcbfk \\
%      Anal.\ Chem.                    & ancham &
%      J.~Phys.\ Chem.~C               & jpccck \\
%      Biochemistry                    & bichaw &
%      J.~Phys.\ Chem.\ Lett.          & jpclcd \\
%      Bioconjugate Chem.              & bcches &
%      J.~Proteome Res.                & jprobs \\
%      Biomacromolecules               & bomaf6 &
%      J.~Am.\ Chem.\ Soc.             & jacsat \\
%      Biotechnol.\ Prog.              & bipret &
%      Langmuir                        & langd5 \\
%      Chem.\ Res.\ Toxicol.           & crtoec &
%      Macromolecules                  & mamobx \\
%      Chem.\ Rev.                     & chreay &
%      Mol.\ Pharm.                    & mpohbp \\
%      Chem.\ Mater.                   & cmatex &
%      Nano Lett.                      & nalefd \\
%      Cryst.\ Growth Des.             & cgdefu &
%      Org.\ Lett.                     & orlef7 \\
%      Energy Fuels                    & enfuem &
%      Org.\ Proc.\ Res.\ Dev.         & oprdfk \\
%      Environ.\ Sci.\ Technol.        & esthag &
%      Organometallics                 & orgnd7 \\
%      Environ.\ Sci.\ Technol.\ Lett. & estlcu \\
%    \bottomrule
%  \end{tabular}
%  \caption{Values for \opt{journal} option}
%  \label{tab:journal}
%\end{table}
%
%\DescribeOption{manuscript}
% The second option is the \opt{manuscript} option. This specifies
% the type of paper in the manuscript.  The values here are
% \opt{article}, \opt{note}, \opt{communication}, \opt{review},
% \opt{letter} and \opt{perspective}. The valid values will depend on
% the value of \opt{journal}.  The \opt{manuscript} option determines
% whether sections and an abstract are valid.  The value
% \opt{suppinfo} is also available for supporting information.
%
%\DescribeOption{layout}
% The \pkg{achemso} class can produce drafts in two layout styles. The
% standard setting for the \opt{layout} option is \opt{traditional},
% which produces a double-spaced single column manuscript. The
% alternative setting \opt{twocolumn} will use single spacing and
% print the text in two columns. The second option is obviously more
% compact. If the journal requires a particular style this option may
% be ignored.
%
%\DescribeOption{email}
% It may be desirable to omit e-mail addresses from the front page of
% a manuscript. The printing of e-mail addresses can be disabled using
% the \opt{email} option, which takes Boolean values only. The default
% is to print e-mail addresses. Notice that phone and fax numbers are
% only printed if e-mail addresses are printed.
%
% Other options are provided by the package, but when used with the
% class these are silently ignored. If you need to override the
% settings chosen by the class, inlcude the settings \emph{after}
% the \cs{documentclass} line using \cs{setkeys}:
%\begin{LaTeXdemo}[code only]
%  \documentclass[journal = jacsat]{achemso}
%  \setkeys{acs}{articletitle = true}
%\end{LaTeXdemo}
%
%\subsection{Manuscript meta-data}
%
%\DescribeMacro{\author}
%\DescribeMacro{\affiliation}
%\DescribeMacro{\alsoaffiliation}
%\DescribeMacro{\altaffiliation}
%\DescribeMacro{\email}
% Inspired by REV\TeX, the \pkg{achemso} class alters the method for
% adding author information to the manuscript.  Each author should be
% given as a separate \cs{author} command.  These should be followed
% by an \cs{affiliation}, which applies to the preceding authors. The
% \cs{affiliation} macro takes an optional argument, for a short
% version of the affiliation.\footnote{This will usually be the
% university or company name.}  At least one author should be
% followed by an \cs{email} macro, containing contact details.  All
% authors with an e-mail address are automatically marked with a
% star.  The example manuscript demonstrates the use of all of these
% macros. Notice that \cs{alsoaffiliation} is used when one (or more)
% authors work at multiple institutions, while \cs{altaffiliation}
% is intended for previous addresses (or other notes). Only
% \cs{affiliation} applies to multiple authors: both
% \cs{alsoaffiliation} and \cs{altaffiliation} are set on a per
% author basis.
%\begin{LaTeXdemo}[code only]
%  \author{Author Person}
%  \author{Second Bloke}
%  \email{second.bloke@some.place}
%  \affiliation[University of Sometown]
%    {University of Somewhere, Sometown, USA}
%  \altaffiliation
%    {Previous address: Minute University, Nowhereville, USA}
%  \author{Indus Trialguy}
%  \email{i.trialguy@sponsor.co}
%  \affiliation[SponsoCo]
%    {Research Department, SponsorCo, BigCity, USA}
%  \alsoaffiliation{University of Somewhere, Sometown, USA}
%\end{LaTeXdemo}
% Repeated entries for \cs{affiliation} and \cs{alsoaffiliation} will
% result in only one address being printed in the address list and
% footnotes. Repeated \cs{altaffiliation} entries only produce a single
% footnote, and can therefore be used for entries such as
%\begin{LaTeXdemo}[code only]
%  \author{First Coworker}
%  \altaffiliation{Contributed equally to this work}
%  \author{Second Coworker}
%  \altaffiliation{Contributed equally to this work}
%\end{LaTeXdemo}
% if required.
%
%\DescribeMacro{\fax}
%\DescribeMacro{\phone}
% The class will recognise the optional information \cs{fax} and
% \cs{phone}, which will be printed along with the lead authors
% e-mail address. Note that this information is only used for authors
% who have an e-mail address supplied.
%\begin{LaTeXdemo}[code only]
%  \author{Second Bloke}
%  \email{second.bloke@some.place}
%  \phone{+xxx (0)yyy zzzzzz}
%  \fax{+xxx (0)yyy wwwwww}
%  \affiliation[University of Sometown]
%    {University of Somewhere, Sometown, USA}
%\end{LaTeXdemo}
%
%\DescribeMacro{\and}
%\DescribeMacro{\thanks}
% The method used for setting the meta-data means that the normal
% \cs{and} and \cs{thanks} macros are not appropriate in the \
% pkg{achemso} class.  Both produce a warning if used.
%
%\DescribeMacro{\title}
% The \cs{title} macro is extended to accept an optional argument.
% This is intended for a shortened version of the journal title
% suitable for running headers. Some journals require that authors
% supply this data: if it is needed then it will be printed in the
% appropriate place.
%\begin{LaTeXdemo}[code only]
%  \title[Short running title]
%    {Long title which would not fit in running headers}
%\end{LaTeXdemo}
%
% The meta-data items should be given in the preamble to the \LaTeX\
% file, and no \cs{maketitle} macro is required in the document body.
% This is all handled by the class file directly.  At least one
% author, affiliation and e-mail address must be specified.
%
%\subsection{Floats}
%\DescribeEnv{scheme}
%\DescribeEnv{chart}
%\DescribeEnv{graph}
% The class defines three new floating environments: \texttt{scheme},
% \texttt{chart} and \texttt{graph}. These can be used as expected to
% include graphical content.  The placement of these new floats and the
% standard \texttt{table} and \texttt{figure} floats is altered to be
% ``here'' if possible.  The contents of all floats is automatically
% horizontally centred on the page.
%
%\subsection{Section headers}
%
%\DescribeMacro{\SectionNumbersOff}
%\DescribeMacro{\SectionNumbersOn}
% Some journals have no section numbering by default. This can be
% set up in the appropriate configuration file, but it may be that
% individual users need to change the decision. The macros
% \cs{SectionNumbersOff} and \cs{SectionNumbersOn} are therefore
% available: these should be given in the preamble.
%
%\DescribeMacro{\SectionsOff}
%\DescribeMacro{\SectionsOn}
% More radically, the entire availability of sections can be turned on
% and of. This is functionality is available to the user \emph{via} the
% \cs{SectionsOn} and \cs{SectionsOff} macros, which again are
% preamble-only.
%\DescribeMacro{\AbstractOff}
%\DescribeMacro{\AbstractOn}
% Similar functions are available for the abstract: \cs{AbstractOff} and
% \cs{AbstractOn}.
%
%\subsection{Special sections}
%
%\DescribeEnv{acknowledgement}
%\DescribeEnv{suppinfo}
% The sections for acknowledgements and supporting information
% have dedicated environments available.  These ensure that
% the section headings are generated, and that the text is
% sized corrected when using creating a Communication.
%\begin{LaTeXdemo}[code only]
%  \begin{acknowledgement}
%    The authors thank A.N.~Other.
%  \end{acknowledgement}
%
%  \begin{suppinfo}
%    Full characterization data for all new compounds.
%  \end{suppinfo}
%\end{LaTeXdemo}
%
%\DescribeEnv{tocentry}
% For generating an entry for the graphical table of content, required
% by some journals, the environment \texttt{tocentry} is available. This
% prints its content in an appropriately sized box on a separate page.
% In contrast to the rest of the manuscript, this section is intended to
% be ``print ready'' in appearance.

%\begin{LaTeXdemo}[code only]
%  \begin{tocentry}
%    \includegraphics{toc-entry-graphic}
%    Some text to explain the graphic.
%  \end{tocentry}
%\end{LaTeXdemo}
%
% \subsection{Miscellaneous commands}
% 
% \DescribeMacro{\latin}
%   
% The command \cs{latin} is provided by the class to format Latin phrases
% such as ``et al.'' Most ACS journals do not make these italic, but
% some (for example \emph{ACS Nano}) do. By providing a command, the formatting
% is left flexible.
%
%\section{The package file}
% The \pkg{achemso} package is independent of the classs file, and
% contains parts of the bundle useful outside of submission to the
% \ACS.
%
%\subsection{Package options}
%
% As with the class options, the package uses the key--value method
% for option set up. These are used to control the output of citations
% and bibliographic data. The same options are used when creating
% journal configurations for the class: this is a task most users will
% not need to undertake!
%
%\DescribeOption{super}
% The \opt{super} option affects the handling of superscript
% reference markers.  The option switches this behaviour
% on and off (and takes Boolean values: \opt{super=true} and
% \opt{super=false} are valid).
%
%\DescribeOption{articletitle}
% The \opt{articletitle} option is a Boolean, and sets whether the title
% of a paper referenced appears in the bibliography.  The default is
% \opt{articletitle=false} for the \file{achemso} style and
% \opt{articletitle=true} for the \file{biochem} style.
%
% \DescribeOption{chaptertitle}
% The option boolean \opt{chaptertitle} option is provided to allow flexibility
% for the inclusion of chapter titles for \texttt{book} and
% related entries. The standard setting is \opt{false}: setting
% it to \opt{true} will cause chapter titles to be included.
%
%\DescribeOption{etalmode}
%\DescribeOption{maxauthors}
% Many journals require that long lists of authors are shortened using
% `et al.' in the references section. The behaviour of the \BibTeX\
% styles in this regard is controlled by two options, \opt{etalmode}
% and \opt{maxauthors}. There are two possible ways to shorten a long
% list of authors. Some journals require that only the first author
% is given, followed by `et al.': for this behaviour, set
% \opt{etalmode=firstonly}:
%\begin{verbatim}
%  Jones, A.N. et al.
%\end{verbatim}
% On the other hand, some journals request that the list of authors
% is truncated after $n$ authors. This is set up by the
% \opt{etalmode=truncate} option:
%\begin{verbatim}
%  Jones, A.N.; Bloggs, F.; Nobacon, D. et al.
%\end{verbatim}
% In both cases, the maximum number of authors permitted before
% introducing `et al.' is governed by the \opt{maxauthors} option.
% This option recognises the sentinel value $0$, which indicates that
% no shortening should occur at all.
%
%\DescribeOption{biblabel}
% Redefining the formatting of the numbers used in the bibliography
% usually requires modifying internal \LaTeX\ macros.  The
% \opt{biblabel} option makes these changes more accessible: valid
% values are \opt{plain} (use the number only), \opt{brackets}
% (surround the number in brackets) and \opt{period} or
% \opt{fullstop} (follow the number by a full stop/period).
%
%\DescribeOption{biochem}
%\DescribeOption{biochemistry}
% Most \ACS\ journals use the same bibliography style, with the only
% variation being the inclusion of article titles.  However, a small
% number of journals use a rather different style; the journal
% \emph{Biochemistry} is probably the most prominent.  The
% \opt{biochemistry} or \opt{biochem} option uses the style of
% \emph{Biochemistry} for the bibliography, rather than the normal
% \ACS\ style.  For this style, the \opt{articletitle=true} option is the
% default.\footnote{More accurately, the default built into the
% \BibTeX\ style file is to use article titles with the
% \emph{Biochemistry} style.}
%
%\subsection{Bibliography notes}
%
%\DescribeMacro{\bibnote}
%\DescribeMacro{\bibnotemark}
%\DescribeMacro{\bibnotetext}
% \pkg{achemso} provides the \cs{bibnote} macro. This is intended for
% addition of notes to the bibliography (references).  The macro
% accepts a single argument, which is transferred to the bibliography by
% \BibTeX. In analogy to \cs{footnote}, the macros \cs{bibnotemark} and
% \cs{bibnotetext} are available for dividing up the marker for a
% note from the text.
%\begin{LaTeXdemo}
%  Some text \bibnote{This note text will be in the bibliography}.
%\end{LaTeXdemo}
%
% The functionality for bibnotes in \pkg{achemso} is based on that
% in the \pkg{notes2bib} package. The \pkg{notes2bib} package can be
% loaded with the \pkg{achemso} package, and no clash will occur. With
% the class file, \pkg{notes2bib} will be ignored if requested, to
% prevent issues on submission to the \ACS.
%
%\section{The \texorpdfstring{\BibTeX}{BibTeX} style files}
%
% \pkg{achemso} is supplied with two style files, \file{achemso.bst} and
% \file{biochem.bst}.  The direct use of these without the \pkg{achemso}
% package file is not recommended, but is possible.  The style files
% can be loaded in the usual way, with a \cs{bibliographystyle}
% command.  The \pkg{natbib} package must be loaded by the \LaTeX\ file
% concerned, if the \pkg{achemso} package is not in use.
%
% The style files are designed to use the \pkg{mciteplus} package if it
% is available, but to work even if is not. When \pkg{mciteplus} is
% present, it is possible to automatically produce references of the
% form
%\begin{quotation}
%  \noindent
%  (5) (a) Arduengo,~A.~J.,~III; Dias,~H. V.~R.; Harlow,~R.~L.;
%  Kline,~M. \emph{{J}.~{A}m.\ {C}hem.\ {S}oc.} \textbf{1992},
%  \emph{114}, 5530--5534; (b) Appelhans,~L.~N.; Zuccaccia,~D.;
%  Kovacevic,~A.; Chianese,~A.~R.; Miecznikowski,~J.~R.; Macchioni,~A.;
%  Clot,~E.; Eisenstein,~O.; Crabtree,~R.~H. \emph{{J}.~{A}m.\ {C}hem.
%  {S}oc.} \textbf{2005}, \emph{127}, 16299--16311; (c)
%  Arduengo,~A.~J.,~III; Gamper,~S.~F.; Calabrese,~J.~C.; Davidson,~F.
%  \emph{J.~Am.\ Chem.\ Soc.} \textbf{1994}, \emph{116}, 4391--4394.
%\end{quotation}
% as demonstrated in the example document. When \pkg{mciteplus} is
% not present, this functionality is not available but the style files
% will work normally.
%
% The \BibTeX\ style files implement the bibliographic style
% specified by the \ACS\ in \emph{The ACS Style Guide}
% \cite{Coghill2006}.  By default, article titles are not included in
% output using the \file{achemso.bst} file, but are with the
% \file{biochem.bst} file.
%
% The style used by the \ACS\ does not differentiate between
% \BibTeX\ \texttt{book}, \texttt{inbook}, \texttt{collection} and
% \texttt{incollection} entries. As a result, the appearance of
% these entry types depends on the fields available. Named subdivisions
% of a book (for example, chapters where each has a named author)
% should be given in the \texttt{title} field, with the title of
% the book itself in the \texttt{booktitle} field. The
% \texttt{chapter} field should be used for a chapter number, and
% is printed as part of the pagination.
%
% One frequently asked question is why some people see an empty first
% item in their bibliography when using the \pkg{achemso} package or
% class. This is usually because they have downloaded the \LaTeX\ files
% and done a local installation without also updating the \BibTeX\
% style. The two must be from the same version of \pkg{achemso}: they
% are designed to work together.
%
%\section{The \pkg{natmove} package}
%
% The \pkg{natmove} package does only one job.  It brings the ability to
% move punctuation after citations, using code borrowed from the
% \pkg{cite} package. Both the \pkg{achemso} class and package load
% \pkg{natmove} automatically.
%\begin{LaTeXdemo}
%  Some text \cite{Coghill2006} some more text.\\
%  Some text ending a sentence \cite{Coghill2006}.
%\end{LaTeXdemo}
% This is deactivated for other citation types.
%\begin{LaTeXdemo}
%  Some text \citeyear{Coghill2006}.\\
%  Some text \citeauthor{Coghill2006}.\\
%  Some text \citenum{Coghill2006}.
%\end{LaTeXdemo}
% The package does nothing if the \opt{super} option has not been
% given to \pkg{natbib}.  This means that the source can be written
% without needing to decide where citations will to appear, with the
% \opt{super} option for \pkg{natbib} controlling the result.
%
%\DescribeMacro{\natmovechars}
% One user macro is provided: \cs{natmovechars}.  This contains
% the characters which are moved before superscript punctuation.
% The default contents is |,;:.| and can be set using
% \cs{renewcommand*}:
%\begin{LaTeXdemo}
%  \renewcommand*{\natmovechars}{.}
%  Some text \cite{Coghill2006},
%  more text \cite{Coghill2006}.
%\end{LaTeXdemo}
%
%\StopEventually{^^A
%  \PrintChanges
%  \PrintIndex
%  \bibliography{achemso-demo}
%}
%
%\section{Implementation}
%
% A lot of the work done by the package is also needed by the class.
% Loading the package and the class makes load-order awkward. Instead,
% the two parts are done in one place. Sandwiching the common code are
% two slices of dedicated material for the class and the package. Some
% of this is needed ``early'', before the common material, whilst the
% rest is ``late''.
%
%\subsection{Early class-only code}
%
% So that there is no confusion, the base class is loaded early.
%    \begin{macrocode}
%<*class>
\ProvidesClass{achemso}
  [2013/08/23 v3.8 Submission to ACS journals]
\LoadClass[12pt,letter]{article}
%    \end{macrocode}
%   
%\begin{macro}{\acs@warning}
% The code for a warning is created so that it works for the package too.
%    \begin{macrocode}
\newcommand*\acs@warning{\ClassWarning{achemso}}
%</class>
%    \end{macrocode}
%\end{macro}
%
%\subsection{Early package-only code}
%
% The package and the class should not both be loaded, as the two use
% the same internal macro names. On the other hand, if the class is
% not in use a reminder is printed to use it if possible.
%    \begin{macrocode}
%<*package>
\ProvidesPackage{achemso}
  [2013/08/23 v3.8 Support for ACS journals]
\@ifclassloaded{achemso}{%
  \PackageInfo{achemso}{%
    You have already loaded the `achemso' class:\MessageBreak
    loading the package will abort%
  }%
  \endinput
}{%
  \PackageInfo{achemso}{%
    When writing a submission to an ACS journal, please\MessageBreak
    use the achemso document class%
  }%
}
%    \end{macrocode}
%   
%\begin{macro}{\acs@warning}
% The code for a warning is created so that it works for the class too.
%    \begin{macrocode}
\newcommand*\acs@warning{\PackageWarning{achemso}}
%</package>
%    \end{macrocode}
%\end{macro}
%   
%\subsection{Common code}
%
%\begin{macro}{\acs@ifundefined}
% A non-expandable test for defined macros: does not add to the hash
% table.
%    \begin{macrocode}
%<*package|class>
\newcommand*\acs@ifundefined[1]{%
  \begingroup\expandafter\expandafter\expandafter\endgroup
  \expandafter\ifx\csname #1\endcsname\relax
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}
%    \end{macrocode}
%\end{macro}
%
% The first stage needed is to read the package options given. Although
% \pkg{xkeyval} was perhaps not the best choice, changing this now would
% be rather risky.
%    \begin{macrocode}
\RequirePackage{xkeyval}
%    \end{macrocode}
%\begin{macro}{\acs@keyval@bool}
% A support macro for making Boolean options: the \pkg{xkeyval} version
% is only available in newer releases.
%    \begin{macrocode}
\newcommand*\acs@keyval@bool[2]{%
  \acs@ifundefined{acs@#1#2}{%
    \acs@warning{Unknown option `#2' for key #1}%
  }{%
    \@nameuse{acs@#1#2}%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\ifacs@abbreviations}
%\begin{macro}{\ifacs@articletitle}
%\begin{macro}{\ifacs@biochem}
%\begin{macro}{\ifacs@chaptertitle}
%\begin{macro}{\ifacs@email}
%\begin{macro}{\ifacs@hyperref}
%\begin{macro}{\ifacs@keywords}
%\begin{macro}{\ifacs@super}
% These are all very trivial definitions: to avoid issues with older
% versions of \pkg{xkeyval} each definition is done directly.
%    \begin{macrocode}
\newif\ifacs@abbreviations
\newif\ifacs@articletitle
\newif\ifacs@biochem
\newif\ifacs@chaptertitle
\newif\ifacs@email
\newif\ifacs@hyperref
\newif\ifacs@keywords
\newif\ifacs@super
\define@key{acs}{abbreviations}[true]{%
  \acs@keyval@bool{abbreviations}{#1}%
}
\define@key{acs}{articletitle}[true]{%
  \acs@keyval@bool{articletitle}{#1}%
}
\define@key{acs}{biochem}[true]{%
  \acs@keyval@bool{biochem}{#1}%
}
\define@key{acs}{chaptertitle}[true]{%
  \acs@keyval@bool{chaptertitle}{#1}%
}
\define@key{acs}{email}[true]{%
  \acs@keyval@bool{email}{#1}%
}
\define@key{acs}{hyperref}[true]{%
  \acs@keyval@bool{hyperref}{#1}%
}
\define@key{acs}{keywords}[true]{%
  \acs@keyval@bool{keywords}{#1}%
}
\define@key{acs}{super}[true]{%
  \acs@keyval@bool{super}{#1}%
}
\define@key{acs}{usetitle}[true]{%
  \acs@keyval@bool{articletitle}{#1}%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@journal}
%\begin{macro}{\acs@layout}
%\begin{macro}{\acs@manuscript}
%\begin{macro}{\acs@maxauthors}
% Trivial again: done without using \pkg{xkeyval} for the same reasons
% as before.
%    \begin{macrocode}
\newcommand*\acs@journal{jacsat}
\newcommand*\acs@layout{traditional}
\newcommand*\acs@manuscript{article}
\newcommand*\acs@maxauthors{15}
\define@key{acs}{journal}{%
  \def\acs@journal{#1}%
}
\define@key{acs}{layout}{%
  \def\acs@layout{#1}%
}
\define@key{acs}{manuscript}{%
  \def\acs@manuscript{#1}%
}
\define@key{acs}{maxauthors}{%
  \def\acs@maxauthors{#1}%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\ifacs@etal@truncate}
%\begin{macro}{\acs@etal@firstonly}
%\begin{macro}{\acs@etal@truncate}
% The setup for the \opt{etalmode} option is quite simple: just look
% for the appropriate macros.
%    \begin{macrocode}
\newif\ifacs@etal@truncate
\define@key{acs}{etalmode}{%
  \acs@ifundefined{acs@etal@#1}{%
    \acs@warning{%
      Unknown value `#1' for\MessageBreak  etalmode option%
    }%
  }{%
    \@nameuse{acs@etal@#1}%
  }%
}
\newcommand*\acs@etal@firstonly{\acs@etal@truncatefalse}
\newcommand*\acs@etal@truncate{\acs@etal@truncatetrue}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
% \begin{macro}{\acs@activate@biblabel}
% The \opt{biochemistry} option is an alias for \opt{biochem}. The
% \opt{biblabel} option is a choice, which is implemented using a
% csname search. The group here prevents hash table pollution, whilst
% the \pkg{xkeyval} method is avoided as it is more complex than it is
% worth!
%    \begin{macrocode}
\define@key{acs}{biochemistry}{%
  \setkeys{acs}{biochem = #1}%
}
\define@key{acs}{biblabel}{%
  \acs@ifundefined{acs@biblabel@#1}{%
    \acs@warning{%
      Unknown value `#1' for\MessageBreak biblabel option%
    }%
  }{%
    \acs@activate@biblabel{\@nameuse{acs@biblabel@#1}}%
  }%
}
\newcommand*\acs@activate@biblabel{}
%<*class>
\let\acs@activate@biblabel\AtEndOfClass
\AtEndOfClass{\let\acs@activate@biblabel\@firstofone}
%</class>
%<*package>
\let\acs@activate@biblabel\AtEndOfPackage
\AtEndOfPackage{\let\acs@activate@biblabel\@firstofone}
%</package>
%    \end{macrocode}
% \end{macro}
%\begin{macro}{\acs@biblabel@brackets}
%\begin{macro}{\acs@biblabel@fullstop}
%\begin{macro}{\acs@biblabel@period}
%\begin{macro}{\acs@biblabel@plain}
% The macros to implement the idea above for biblabels.
%    \begin{macrocode}
\newcommand*\acs@biblabel@brackets{\def\bibnumfmt##1{(##1)}}
\newcommand*\acs@biblabel@fullstop{\def\bibnumfmt##1{##1.}}
\newcommand*\acs@biblabel@period{\def\bibnumfmt##1{##1.}}
\newcommand*\acs@biblabel@plain{\def\bibnumfmt##1{##1}}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
% Set up some defaults.
%    \begin{macrocode}
\setkeys{acs}{
  email = true,
  super = true
}
%    \end{macrocode}
% Loading some other packages depends on the options chosen, so they
% are processed now.
%    \begin{macrocode}
\ProcessOptionsX*<acs>
%    \end{macrocode}
%   
%\begin{macro}{\acs@manuscript@communication}
%\begin{macro}{\acs@manuscript@letter}
%\begin{macro}{\acs@manuscript@note}
%\begin{macro}{\acs@manuscript@review}
%\begin{macro}{\acs@manuscript@suppinfo}
% For text comparisons.
%    \begin{macrocode}
\newcommand*\acs@manuscript@communication{communication}
\newcommand*\acs@manuscript@letter{letter}
\newcommand*\acs@manuscript@note{note}
\newcommand*\acs@manuscript@review{review}
\newcommand*\acs@manuscript@suppinfo{suppinfo}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%   
%\begin{macro}{\acs@niib@create}
%\begin{macro}{bibnote}
%\begin{macro}{\thebibnote}
%\begin{macro}{\bibnote}
%\begin{macro}{\bibnotemark}
%\begin{macro}{\bibnotetext}
%\begin{macro}{\printbibnotes}
% To avoid needing to load the \pkg{notes2bib} package, especially as
% the plan is to move that package to \LaTeX3 internal syntax,
% \pkg{achemso} provides a minimal version here. The first step is to
% create macros which will need a guard against \pkg{notes2bib} already
% having been loaded. To allow the package and class to behave
% differently these are actually applied later.
%    \begin{macrocode}
\newcommand*\acs@niib@create{%
  \@namedef{ver@notes2bib.sty}{%
    2009/04/20 v1.6a Integrating notes into the bibliography (achemso
    version)
  }%
  \@ifundefined{c@bibnote}{\newcounter{bibnote}}{}
  \def\thebibnote{%
    Note-\the\value{bibnote}%
  }%
  \DeclareRobustCommand*{\bibnote}[1][\thebibnote]{%
    \stepcounter{bibnote}%
    \def\acs@niib@after@text{\cite{##1}}%
    \acs@niib@text{##1}%
  }%
  \DeclareRobustCommand*{\bibnotemark}[1][\thebibnote]{%
    \stepcounter{bibnote}%
    \cite{##1}%
  }%
  \DeclareRobustCommand*{\bibnotetext}[1][\thebibnote]{%
    \let\acs@niib@after@text\relax
    \acs@niib@text{##1}%
  }%
  \newcommand*\printbibnotes{%
    \ifnum\the\value{bibnote}>\z@\relax
      \nocite{achemso-control}%
      \acs@bibliography{acs-\jobname}%
    \fi
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@niib@after@text}
% After the text.
%    \begin{macrocode}
\newcommand*\acs@niib@after@text{}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\acs@niib@text}
% The \cs{acs@niib@text} macro is the outer part of the writing system.
% It does not absorb the text of note, as without \eTeX\ this is bad
% news. The same file is used for notes and the control entry for
% the bibliography style.
%    \begin{macrocode}
\newcommand*\acs@niib@text{%
  \@bsphack
  \if@filesw
    \expandafter\acs@niib@write
  \else
    \expandafter\acs@niib@no@write
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\acs@niib@write}
%\begin{macro}{\acs@niib@write@aux@i}
%\begin{macro}{\acs@niib@write@aux@ii}
% Writing verbatim without \eTeX.
%    \begin{macrocode}
\newcommand*\acs@niib@write[1]{%
  \begingroup
    \let\do\@makeother
    \dospecials
    \catcode`\{ 1\relax
    \catcode`\} 2\relax
    \acs@niib@write@aux@i{#1}%
}
\newcommand*\acs@niib@write@aux@i[1]{%
  \long\def\@tempa##1{%
      \def\@tempa{##1}%
      \@onelevel@sanitize\@tempa
    \expandafter\endgroup
    \expandafter\def\expandafter\@tempa\expandafter{\@tempa}%
    \acs@niib@write@aux@ii{#1}%
  }%
  \catcode`\^^M 10\relax
  \@tempa
}
\newcommand*\acs@niib@write@aux@ii[1]{%
  \immediate\write\acs@bib@file{%
    @Misc\string{#1,^^J%
    \space\space note = \string{\@tempa\string},^^J%
    \string}^^J%
  }%
  \@esphack
  \acs@niib@after@text
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@niib@no@write}
% If no files are to be written, a bit of tidying up.
%    \begin{macrocode}
\newcommand\acs@niib@no@write[2]{%
  \@esphack
  \acs@niib@after@text
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\nmv@natbib@detect}
%\begin{macro}{\acs@nmv@activate}
%\begin{macro}{\acs@autonote}
% The functionality of \pkg{notes2bib} is combined with the standard
% \cs{cite} macro, to give automatic note-like data in the bibliography.
%    \begin{macrocode}
\AtBeginDocument{
  \def\nmv@natbib@detect{%
    \ifNAT@super
      \expandafter\acs@nmv@activate
    \else
      \expandafter\acs@autonote
    \fi
  }
}
\newcommand*\acs@nmv@activate{%
  \let\nmv@citex@nat\@citex
  \let\@citex\nmv@citex
  \let\nmv@cite\cite
  \renewcommand*{\cite}[2][]{%
    \nmv@ifmtarg{##1}{%
      \nmv@citetrue
      \nmv@cite{##2}%
    }{%
      \nocite{##2}%
      \bibnote{Ref.~\citenum{##2}, ##1}%
    }%
  }%
}
\newcommand*\acs@autonote{%
  \let\nmv@cite\cite
  \renewcommand*{\cite}[2][]{%
    \nmv@ifmtarg{##1}{%
      \nmv@cite{##2}%
    }{%
      \nocite{##2}%
      \bibnote{Ref.~\citenum{##2}, ##1}%
    }%
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%
%\begin{macro}{\acs@bib@file}
%\begin{macro}{\acs@bib@message}
%\begin{macro}{\acs@bib@name}
% Some information or creating the control file for \BibTeX\ is set up.
%    \begin{macrocode}
\newwrite\acs@bib@file
\newcommand*\acs@bib@message{%
  This is an auxiliary file used by the `achemso' bundle.^^J%
  This file may safely be deleted. It will be recreated as required.^^J
}
\newcommand*\acs@bib@name{acs-\jobname.bib}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@bib@write}
%\begin{macro}{\acs@bib@write@aux}
% The control information for \BibTeX\ needs to be written to a special
% file. The main writing macro is quite simple. Actually writing the
% information is left to the code for \cs{bibliography}, so that this
% only happens if needed.
%    \begin{macrocode}
\newcommand*\acs@bib@write{%
  \if@filesw
    \expandafter\acs@bib@write@aux
  \fi
}
\AtBeginDocument{\acs@bib@write}
\newcommand*\acs@bib@write@aux{%
  \immediate\openout\acs@bib@file\acs@bib@name\relax
  \immediate\write\acs@bib@file{\acs@bib@message}%
  \edef\@tempa##1##2{%
    \space\space##1\space = "##2",^^J%
  }%
  \immediate\write\acs@bib@file{%
    @Control\string{%
      achemso-control,^^J%
      \@tempa{ctrl-article-title\space}{%
        \ifacs@articletitle yes\else no\fi
      }%
      \@tempa{ctrl-chapter-title\space}{%
        \ifacs@chaptertitle yes\else no\fi
      }%
      \@tempa{ctrl-etal-number\space\space\space}{\acs@maxauthors}%
      \@tempa{ctrl-etal-firstonly}{%
        \ifacs@etal@truncate no\else yes\fi
      }%
    \string}^^J%
  }%
  \immediate\write\@auxout{%
    \string\citation\string{achemso-control\string}%
  }%
  \AtEndDocument{%
    \immediate\closeout\acs@bib@file\relax
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%
%\begin{macro}{\acs@bibliography}
%\begin{macro}{\bibliography}
% The \cs{bibliography} macro is now patched so that everything works
% correctly.
%    \begin{macrocode}
\AtBeginDocument{%
  \let\acs@bibliography\bibliography
  \def\bibliography#1{%
    \acs@bibliography{acs-\jobname,#1}%
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%
% \begin{macro}{\latin}
%   The journal \emph{ACS Nano} formats Latin phrases differently from
%   every other ACS journal: we provide a \cs{latin} command to cover this.
%    \begin{macrocode}
\AtBeginDocument{
  \providecommand{\latin}[1]{#1}
}
%</package|class>
%    \end{macrocode}
% \end{macro}
%
%\subsection{Late class-only code}
%
% Most of the power of the class is now created. First, a few options
% are reset so that any given by the user are effectively ignored.
%    \begin{macrocode}
%<*class>
\setkeys{acs}{
  abbreviations = false,
  articletitle  = false,
  biblabel      = brackets,
  biochem       = false,
  etalmode      = firstonly,
  keywords      = false,
  maxauthors    = 15,
  super         = true
}
%    \end{macrocode}
% When using the class, \pkg{notes2bib} is always emulated. Other
% standard support packages can now be loaded.
%    \begin{macrocode}
\acs@niib@create
\RequirePackage[margin=2.54cm]{geometry}
\RequirePackage{
  caption,
  float,
  graphicx,
  setspace,
  url
}
\ifacs@hyperref
  \expandafter\RequirePackage
\else
  \expandafter\@gobble
\fi
  {hyperref}
\AtBeginDocument{\doublespacing}
%    \end{macrocode}
%   
%\begin{macro}{\title}
%\begin{macro}{\@title}
%\begin{macro}{\acs@title@short}
% For the meta-data, the REV\TeX\ bundle provides a good model for
% the commands to give the author.  \cs{gdef} is used here to
% avoid any odd grouping issues. 
%    \begin{macrocode}
\renewcommand*{\title}[2][]{%
  \gdef\acs@title@short{#1}%
  \gdef\@title{#2}%
  \ifx\acs@title@short\@empty
    \global\let\acs@title@short\@title
  \fi
}
\@onlypreamble\title
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@author@cnt}
%\begin{macro}{\acs@affil@cnt}
%\begin{macro}{\acs@affil@alt@cnt}
% \pkg{achemso} tracks the number authors, affiliations and alternative
% affiliations.
%    \begin{macrocode}
\newcount\acs@author@cnt
\newcount\acs@affil@cnt
\newcount\acs@affil@alt@cnt
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@footnote@cnt}
%\begin{macro}{\acs@affil@marker@cnt}
% Two counts for getting affiliation footnotes correct.
%    \begin{macrocode}
\newcount\acs@footnote@cnt
\newcount\acs@affil@marker@cnt
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\author}
% The author macro stores the current author details and sets the
% affiliation of the author to the current one. Everything is
% \cs{global} so that there is no possibility of begin trapped inside a
% group. The affiliation counter is always one behind, and so it is
% locally incremented to keep the logic of the code clear elsewhere.
%    \begin{macrocode}
\def\author#1{%
  \global\advance\acs@author@cnt\@ne\relax
  \expandafter\gdef\csname @author@\@roman\acs@author@cnt\endcsname{#1}%
  \begingroup
    \advance\acs@affil@cnt\@ne
    \expandafter\xdef\csname @author@affil@\@roman
      \acs@author@cnt\endcsname
      {\the\acs@affil@cnt}%
  \endgroup
}
\@onlypreamble\author
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\and}
%\begin{macro}{\thanks}
% Neither \cs{and} nor \cs{thanks} are used by the document class.
%    \begin{macrocode}
\def\and{%
  \acs@warning{%
    \string\and\space not used by the achemso class: please see
    the\MessageBreak package documentation for details%
  }%
}
\def\thanks{%
  \acs@warning{%
    \string\thanks\space not used by the achemso class: please see
    the\MessageBreak the package documentation for details%
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\affiliation}
% As with \cs{author}, everything is \cs{global} just in case. The
% system insists that affiliations come after authors. Before anything
% is committed, a check is made that the affiliation has not already
% been seen.
%    \begin{macrocode}
\newcommand*\affiliation[2][\relax]{%
  \ifnum\acs@author@cnt>\z@\relax
    \acs@affil@ifdup{#2}{%
      \acs@affil@swap{#2}%
    }{%
      \global\advance\acs@affil@cnt\@ne\relax
      \expandafter\gdef\csname @address@\@roman\acs@affil@cnt\endcsname
        {#2}%
      \ifx\relax#1\relax
        \expandafter\gdef\csname @affil@\@roman\acs@affil@cnt\endcsname
          {#2}%
      \else
        \expandafter\gdef\csname @affil@\@roman\acs@affil@cnt\endcsname
          {#1}%
      \fi
    }%
  \else
    \acs@warning{Affiliation with no author}%
  \fi
}
\@onlypreamble\affiliation
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\acs@affil@ifdup}
%\begin{macro}{\acs@affil@ifdup@aux}
% A short test for two addresses being identical.
%    \begin{macrocode}
\newcommand*\acs@affil@ifdup[1]{%
  \begingroup
    \def\@tempa{#1}%
    \@tempswafalse
    \@tempcnta\z@\relax
    \acs@affil@ifdup@aux
    \if@tempswa
      \aftergroup\@firstoftwo
    \else
      \aftergroup\@secondoftwo
    \fi
  \endgroup
}
\newcommand*\acs@affil@ifdup@aux{%
  \advance\@tempcnta\@ne\relax
  \expandafter\expandafter\expandafter\def\expandafter\expandafter
    \expandafter\@tempb\expandafter\expandafter\expandafter
    {\csname @address@\@roman\@tempcnta\endcsname}%
  \ifx\@tempa\@tempb
    \expandafter\@tempswatrue
  \else
    \ifnum\@tempcnta<\acs@affil@cnt\relax
      \expandafter\expandafter\expandafter\acs@affil@ifdup@aux
    \fi
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@affil@swap}
%\begin{macro}{\acs@affil@swap@aux}
% If the affiliation has already been given, then all of the authors
% need to be checked to make sure that the correct affiliation is used.
% First, the loop from above is used to find the correct number for the
% duplicate.
%    \begin{macrocode}
\newcommand*\acs@affil@swap[1]{%
  \begingroup
    \def\@tempa{#1}%
    \@tempcnta\z@\relax
    \@tempcntb\z@\relax
    \acs@affil@ifdup@aux
    \advance\acs@affil@cnt\@ne\relax
    \acs@affil@swap@aux
  \endgroup
}
\newcommand*\acs@affil@swap@aux{%
  \advance\@tempcntb\@ne\relax
  \expandafter\ifnum\csname @author@affil@\@roman\@tempcntb\endcsname
    = \acs@affil@cnt\relax
    \expandafter\xdef\csname @author@affil@\@roman\@tempcntb\endcsname{%
      \the\@tempcnta
    }%
  \fi
  \ifnum\@tempcntb<\acs@author@cnt\relax
    \expandafter\acs@affil@swap@aux
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\alsoaffiliation}
%\begin{macro}{\acs@alsoaffil@find}
% To allow complex affiliations , two commands are needed. The first
% deals with affiliations that are in some way shared by several
% authors. This is tracked on a per author basis.
%    \begin{macrocode}
\newcommand*\alsoaffiliation[2][\relax]{%
  \ifnum\acs@author@cnt>\z@\relax
    \acs@affil@ifdup{#2}{%
      \acs@alsoaffil@find{#2}%
    }{%
      \global\advance\acs@affil@cnt\@ne\relax
      \@tempcnta\acs@affil@cnt\relax
      \expandafter\gdef\csname @address@\@roman\acs@affil@cnt\endcsname
        {#2}%
      \ifx\relax#1\relax
        \expandafter\gdef\csname @affil@\@roman\acs@affil@cnt\endcsname
          {#2}%
      \else
        \expandafter\gdef\csname @affil@\@roman\acs@affil@cnt\endcsname
          {#1}%
      \fi
    }%
    \@ifundefined{@author@alsoaffil@\@roman\acs@author@cnt}{%
      \expandafter\xdef\csname @author@alsoaffil@\@roman\acs@author@cnt
        \endcsname{\the\@tempcnta}%
    }{%
      \expandafter\xdef\csname @author@alsoaffil@\@roman\acs@author@cnt
        \endcsname{%
        \csname @author@alsoaffil@\@roman\acs@author@cnt\endcsname
        ,\the\@tempcnta
      }%
    }%
  \else
    \acs@warning{Affiliation with no author}%
  \fi
}
\newcommand*\acs@alsoaffil@find[1]{%
  \begingroup
    \def\@tempa{#1}%
    \@tempcnta\z@\relax
    \@tempcntb\z@\relax
    \acs@affil@ifdup@aux
  \expandafter\endgroup
  \expandafter\@tempcnta\the\@tempcnta\relax
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\altaffiliation}
% For the alternative affiliation, a second count is kept, and the
% affiliation is ``attached'' to the author. The way these are stored
% means that the appropriate affiliation number can be recovered later,
% and so printed correctly when things get complex.
%    \begin{macrocode}
\newcommand*\altaffiliation[1]{%
  \ifnum\acs@author@cnt>\z@\relax
    \begingroup
      \acs@altaffil@ifdup{#1}{%
        \expandafter\xdef\csname @author@altaffil@\@roman\acs@author@cnt
          \endcsname{\the\@tempcnta}%
      }{%
        \global\advance\acs@affil@alt@cnt\@ne\relax
        \expandafter\gdef\csname @altaffil@\@roman\acs@affil@alt@cnt
          \endcsname{#1}%
        \expandafter\xdef\csname @author@altaffil@\@roman\acs@author@cnt
          \endcsname{\the\acs@affil@alt@cnt}%
      }%
    \endgroup
  \else
    \acs@warning{Affiliation with no author}%
  \fi
}
\@onlypreamble\altaffiliation
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\acs@altaffil@ifdup}
%\begin{macro}{\acs@altaffil@ifdup@aux}
% This is very similar to the same routine for normal affiliations but
% with the appropriate name changes.
%    \begin{macrocode}
\newcommand*\acs@altaffil@ifdup[1]{%
  \def\@tempa{#1}%
  \@tempswafalse
  \@tempcnta\z@\relax
  \ifnum\acs@affil@alt@cnt>\z@\relax
    \expandafter\acs@altaffil@ifdup@aux
  \fi 
  \if@tempswa
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}
\newcommand*\acs@altaffil@ifdup@aux{%
  \advance\@tempcnta\@ne\relax
  \expandafter\expandafter\expandafter\def\expandafter\expandafter
    \expandafter\@tempb\expandafter\expandafter\expandafter
    {\csname @altaffil@\@roman\@tempcnta\endcsname}%
  \ifx\@tempa\@tempb
    \expandafter\@tempswatrue
  \else
    \ifnum\@tempcnta<\acs@affil@alt@cnt\relax
      \expandafter\expandafter\expandafter\acs@altaffil@ifdup@aux
    \fi
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\email}
% E-mail addresses are attached to authors as well.
%    \begin{macrocode}
\newcommand*\email[1]{%
  \ifnum\acs@author@cnt>\z@\relax
    \expandafter\gdef\csname @email@\@roman\acs@author@cnt\endcsname
      {#1}%
  \else
    \acs@warning{E-mail with no author}%
  \fi
}
\@onlypreamble\email
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\fax}
%\begin{macro}{\phone}
% Fax and phone numbers are similar.
%    \begin{macrocode}
\newcommand*\fax[1]{%
  \ifnum\acs@author@cnt>\z@\relax
    \expandafter\gdef\csname @fax@\@roman\acs@author@cnt\endcsname
      {#1}%
  \else
    \acs@warning{Fax number with no author}%
  \fi
}
\@onlypreamble\fax
\newcommand*\phone[1]{%
  \ifnum\acs@author@cnt>\z@\relax
    \expandafter\gdef\csname @phone@\@roman\acs@author@cnt\endcsname
      {#1}%
  \else
    \acs@warning{Phone number with no author}%
  \fi
}
\@onlypreamble\phone
%    \end{macrocode}
%\end{macro}
%\end{macro}
%
%\begin{macro}{\abbreviations}
%\begin{macro}{\@abbreviations}
%\begin{macro}{\keywords}
%\begin{macro}{\@keywords}
% Some journals use these.
%    \begin{macrocode}
\newcommand*\abbreviations[1]{%
  \gdef\@abbreviations{#1}%
}
\newcommand*\@abbreviations{}
\@onlypreamble\abbreviations
\newcommand*\keywords[1]{%
  \gdef\@keywords{#1}%
}
\newcommand*\@keywords{}
\@onlypreamble\keywords
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%
%\begin{macro}{\acs@abbreviations@print}
%\begin{macro}{\acs@keywords@print}
%\begin{macro}{\acs@title@short@print}
% For printing the key simple meta-data.
%    \begin{macrocode}
\newcommand*\acs@abbreviations@print{%
  \ifx\@abbreviations\@empty\else
    \section*{Abbreviations}
    \@abbreviations
    \par
  \fi
}
\newcommand*\acs@keywords@print{%
  \ifx\@keywords\@empty\else
    \section*{Keywords}
    \@abbreviations
    \par
  \fi
}
\newcommand*\acs@title@short@print{%
  \section*{Running header}
  \acs@title@short
  \par
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%
%\begin{macro}{\acs@space@pre@title}
%\begin{macro}{\acs@space@post@title}
%\begin{macro}{\acs@space@post@author}
%\begin{macro}{\acs@space@post@address}
%\begin{macro}{\acs@space@post@email}
%\begin{macro}{\acs@maketitle@width}
% Lengths for \cs{@maketitle}.
%    \begin{macrocode}
\newlength\acs@space@pre@title
\setlength\acs@space@pre@title{2em}
\newlength\acs@space@post@title
\setlength\acs@space@post@title{1.5em}
\newlength\acs@space@post@author
\setlength\acs@space@post@author{1em}
\newlength\acs@space@post@address
\setlength\acs@space@post@address{1em}
\newlength\acs@space@post@email
\setlength\acs@space@post@email{1.5em}
\newlength\acs@maketitle@width
\setlength\acs@maketitle@width{\textwidth}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\affilsize}
%\begin{macro}{\authorsize}
%\begin{macro}{\emailsize}
%\begin{macro}{\titlesize}
% Some simple size commands.
%    \begin{macrocode}
\newcommand*\affilsize{\normalsize}
\newcommand*\authorsize{\large}
\newcommand*\emailsize{\normalsize}
\newcommand*\titlesize{\LARGE}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\authorfont}
%\begin{macro}{\authorfont}
%\begin{macro}{\emailfont}
%\begin{macro}{\titlefont}
% Font settings for \cs{@maketitle}.
%    \begin{macrocode}
\newcommand*\affilfont{\itshape}
\newcommand*\authorfont{\sffamily}
\newcommand*\emailfont{}
\newcommand*\titlefont{\bfseries\sffamily}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\ps@acs}
% A shortcut to make page styles.
%    \begin{macrocode}
\newcommand*{\ps@acs}{}
\let\ps@acs\ps@plain
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\@maketitle}
%\begin{macro}{\@maketitle@title@hook}
% With the changes outlined above in place, a new \cs{@maketitle}
% macro is needed.  This is partially a copy of the existing, but
% rather heavily modified.
%    \begin{macrocode}
\def\@maketitle{%
  \pagestyle{acs}%
  \ifnum\acs@author@cnt<\z@\relax
    \acs@warning{No authors defined: At least one author is required}%
  \fi
  \newpage
  \null
  \vspace*{\acs@space@pre@title}%
  \begin{center}
    \begin{minipage}{\acs@maketitle@width}
      \begin{center}
        {%
          \titlefont
          \titlesize
          \let\@fnsymbol\acs@author@fnsymbol
          \let\footnote\acs@title@footnote
          \acs@maketitle@suppinfo \@title
          \acs@title@footnote@check
          \global\acs@footnote@cnt\c@footnote\relax
          \@maketitle@title@hook
          \par
        }%
        \vspace*{\acs@space@post@title}%
        {%
          \authorsize
          \authorfont
          \frenchspacing
          \acs@author@list
          \par
        }%
        \vspace*{\acs@space@post@author}%
        {%
          \affilsize
          \affilfont
          \acs@address@list
          \par
        }%
        \vspace*{\acs@space@post@address}%
        {%
          \emailsize
          \emailfont
          \ifacs@email
            \expandafter\acs@contact@details
          \fi
        }%
        \vspace*{\acs@space@post@email}%
      \end{center}
    \end{minipage}
  \end{center}%
}
\newcommand*\@maketitle@title@hook{}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@maketitle@suppinfo}
% This is spun out so that it can be avoided if necessary: this is done
% on the sly.
%    \begin{macrocode}
\newcommand*\acs@maketitle@suppinfo{%
  \ifx\acs@manuscript\acs@manuscript@suppinfo
    Supporting information for:\\
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\acs@title@footnote}
%\begin{macro}{\acs@title@footnote@check}
% Footnotes need to be created so that they appear correctly.
%    \begin{macrocode}
\newcommand*\acs@title@footnote[1]{%
  \footnotemark
  \g@addto@macro\@thanks@hook{%
    \footnotetext{#1}%
  }%
}
\newcommand\acs@title@footnote@check{%
  \ifx\@thanks@hook\@empty\else
    \expandafter\gdef\expandafter\@thanks@hook\expandafter{%
      \expandafter\begingroup
        \expandafter\let\expandafter\@fnsymbol\expandafter
          \acs@author@fnsymbol
        \@thanks@hook
      \endgroup
    }%
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@contact@details}
% A general contact details macro.
%    \begin{macrocode}
\newcommand*\acs@contact@details{%
  { \sffamily E-mail: \acs@email@list }%
  \acs@number@list
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\@thanks}
%\begin{macro}{\@thanks@hook}
% The \cs{@thanks} macro is used as a hook to generate the footnotes if
% needed.
%    \begin{macrocode}
\def\@thanks{%
  \@thanks@hook
  \ifnum\acs@affil@cnt>\@ne\relax
    \expandafter\acs@affil@list
  \else
    \ifnum\acs@affil@alt@cnt>\z@\relax
      \expandafter\expandafter\expandafter\acs@affil@list
    \fi
  \fi
}
\newcommand*\@thanks@hook{}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@author@list}
%\begin{macro}{\acs@author@list@star}
% Printing the author list needs to do several things. The appropriate
% separators between authors are created and the author names
% themselves are printed.
%    \begin{macrocode}
\newcommand*\acs@author@list{%
  \@tempcnta\z@\relax
  \ifnum\acs@author@cnt=\z@\relax\else
    \expandafter\acs@author@list@main
  \fi
  \acs@author@list@star
}
\newcommand*\acs@author@list@star{%
  \g@addto@macro\@thanks@hook{%
      \setcounter{footnote}{1}%
    \footnotetext{To whom correspondence should be addressed}%
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@author@footnotes}
%\begin{macro}{\acs@author@list@main}
% The main control macro for producing the author list iterates over
% each author on the list. The result is stored as
% \cs{acs@author@listing}.
%    \begin{macrocode}
\newcommand*\acs@author@footnotes{}
\newcommand*\acs@author@list@main{%
  \advance\@tempcnta\@ne\relax
  \def\acs@author@footnotes{}%
  \acs@author@list@and
  \space
  \@nameuse{@author@\@roman\@tempcnta}%
  \acs@author@list@comma
  \acs@author@star
  \acs@author@affil
  \acs@author@affil@also
  \acs@author@affil@alt
  \ifx\@empty\acs@author@footnotes\else
    \textsuperscript{\acs@author@footnotes}%
  \fi
  \ifnum\@tempcnta<\acs@author@cnt\relax
    \expandafter\acs@author@list@main
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@author@list@and}
%\begin{macro}{\acs@author@list@comma}
% Simple checks to add an ``and'' and a comma.
%    \begin{macrocode}
\newcommand*\acs@author@list@and{%
  \ifnum\acs@author@cnt=\@ne\relax\else
    \ifnum\@tempcnta=\acs@author@cnt\relax
      \space and%
    \fi
  \fi
}
\newcommand*\acs@author@list@comma{%
  \ifnum\acs@author@cnt>\tw@\relax
    \ifnum\@tempcnta<\acs@author@cnt\relax
      ,%
    \fi
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@author@star}
%\begin{macro}{\acs@author@star@aux}
% A check for an e-mail for an author: if so, add a star.
%    \begin{macrocode}
\newcommand*\acs@author@star{%
  \acs@ifundefined{@email@\@roman\@tempcnta}{}{%
    \acs@author@star@aux
  }%
}
\newcommand*\acs@author@star@aux{%
  \protected@edef\acs@author@footnotes{%
    \acs@author@fnsymbol{\z@}%
    \ifnum\acs@affil@cnt>\@ne\relax
      ,%
    \else
      \ifnum\acs@affil@alt@cnt>\z@\relax
        ,%
      \fi
    \fi
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@author@affil}
%\begin{macro}{\acs@author@affil@aux}
% The main affiliation of the author is checked for, and assuming one
% is found the appropriate symbol is added to the list.
%    \begin{macrocode}
\newcommand*\acs@author@affil{%
  \acs@ifundefined{%
    @affil@\@roman\csname @author@affil@\@roman\@tempcnta\endcsname
  }{%
    \acs@warning{%
      No affiliation given for author\MessageBreak
      \@nameuse{@author@\@roman\@tempcnta}%
    }%
  }{%
    \acs@author@affil@aux
  }%
}
\newcommand*\acs@author@affil@aux{%
  \ifnum\acs@affil@cnt>\@ne\relax
    \expandafter\acs@affil@marker@cnt\csname @author@affil@\@roman
      \@tempcnta\endcsname\relax
    \advance\acs@affil@marker@cnt\acs@footnote@cnt\relax
    \protected@edef\acs@author@footnotes{%
      \acs@author@footnotes
      \acs@author@fnsymbol{\acs@affil@marker@cnt}%
    }%
  \else
    \ifnum\acs@affil@alt@cnt>\z@\relax
      \acs@affil@marker@cnt\@ne\relax
      \advance\acs@affil@marker@cnt\acs@footnote@cnt\relax
      \protected@edef\acs@author@footnotes{%
        \acs@author@footnotes
        \acs@author@fnsymbol{\acs@affil@marker@cnt}%
      }%
    \fi
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@author@affil@also}
%\begin{macro}{\acs@author@affil@also@aux}
% The ``also'' affiliations are generated by a loop as there may be more
% than one.
%    \begin{macrocode}
\newcommand*\acs@author@affil@also{%
  \acs@ifundefined{@author@alsoaffil@\@roman\@tempcnta}{}{%
    \acs@author@affil@also@aux
  }%
}
\newcommand*\acs@author@affil@also@aux{%
  \expandafter\@for\expandafter\@tempa\expandafter:\expandafter
    =\csname @author@alsoaffil@\@roman\@tempcnta\endcsname\do{%
    \acs@affil@marker@cnt\@tempa\relax
    \advance\acs@affil@marker@cnt\acs@footnote@cnt\relax
    \protected@edef\acs@author@footnotes{%
      \acs@author@footnotes
      ,%
      \acs@author@fnsymbol{\acs@affil@marker@cnt}%
    }%
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@author@affil@alt}
%\begin{macro}{\acs@author@affil@alt@aux}
% Alternative affiliations get the correct affiliation number back out
% from the stored data. There are then two corrections: one for the
% total number of main affiliations and a second in case there is a
% footnote to the title.
%    \begin{macrocode}
\newcommand*\acs@author@affil@alt{%
  \acs@ifundefined{@author@altaffil@\@roman\@tempcnta}{}{%
    \acs@author@affil@alt@aux
  }%
}
\newcommand*\acs@author@affil@alt@aux{%
  \expandafter\acs@affil@marker@cnt
    \csname @author@altaffil@\@roman\@tempcnta\endcsname\relax
  \advance\acs@affil@marker@cnt\acs@affil@cnt\relax
  \advance\acs@affil@marker@cnt\acs@footnote@cnt\relax
  \protected@edef\acs@author@footnotes{%
    \acs@author@footnotes
    ,%
    \acs@author@fnsymbol{\acs@affil@marker@cnt}%
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
% \begin{macro}{\acs@author@fnsymbol}
% \begin{macro}{\acs@author@fnsymbol@aux}
% \begin{macro}{\acs@author@fnsymbol@loop}
% \begin{macro}{\acs@author@fnsymbol@loop@aux@i}
% \begin{macro}{\acs@author@fnsymbol@loop@aux@ii}
% \begin{macro}{\acs@author@fnsymbol@loop@aux@m}
% \begin{macro}{\acs@author@fnsymbol@loop@aux@Q}
% \begin{macro}{\acs@author@fnsymbol@symbol}
% The ACS have an extended list of symbols.  The star appears at the
% special position zero.
%    \begin{macrocode}
\newcommand*{\acs@author@fnsymbol}[1]{%
  \ensuremath{%
    \expandafter\acs@author@fnsymbol@aux\expandafter{\number#1 }%
  }%
}
\newcommand*{\acs@author@fnsymbol@aux}[1]{%
  \ifnum#1>10 %
    \expandafter\acs@author@fnsymbol@loop
  \else
    \expandafter\acs@author@fnsymbol@symbol
  \fi
    {#1}%
}
\newcommand*{\acs@author@fnsymbol@loop}[1]{%
   \acs@author@fnsymbol@loop@aux@i#1%
}
\newcommand*{\acs@author@fnsymbol@loop@aux@i}[2]{%
  \acs@author@fnsymbol@symbol{\ifnum#2=0 10\else #2\fi}%
  \expandafter\acs@author@fnsymbol@loop@aux@ii\romannumeral #1000Q{}%
    {\acs@author@fnsymbol@symbol{\ifnum#2=0 10\else #2\fi}}%
}
\newcommand*{\acs@author@fnsymbol@loop@aux@ii}[1]{%
  \@nameuse{acs@author@fnsymbol@loop@aux@#1}%
}
\def\acs@author@fnsymbol@loop@aux@m#1Q#2#3{%
  \acs@author@fnsymbol@loop@aux@ii#1Q{#2#3}{#3}%
}
\newcommand*{\acs@author@fnsymbol@loop@aux@Q}[2]{#1}
\newcommand*{\acs@author@fnsymbol@symbol}[1]{%
  \ifcase #1 *\or
    \dagger\or
      \ddagger\or
        \P\or
          \S\or
            \|\or
              \bot\or
                \#\or
                  @\or
                    \triangle\or
                      \nabla
    \fi
}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%\begin{macro}{\acs@address@list}
%\begin{macro}{\acs@address@list@aux}
% The main address block is rather less complex than the author
% printing: one print job per address.
%    \begin{macrocode}
\newcommand*\acs@address@list{%
  \@tempcnta\z@\relax
  \ifnum\acs@affil@cnt>\z@\relax
    \acs@address@list@aux
  \else
    \acs@warning{%
      No affiliations: at least one affiliation is needed%
    }%
  \fi
}
\newcommand*\acs@address@list@aux{%
  \advance\@tempcnta\@ne\relax
  \ifnum\acs@affil@cnt>\@ne\relax
    \ifnum\@tempcnta=\acs@affil@cnt\relax
      and
    \fi
  \fi
  \@nameuse{@address@\@roman\@tempcnta}%
  \ifnum\@tempcnta<\acs@affil@cnt\relax
    ,
    \expandafter\acs@address@list@aux
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@fnsymbol@org}
%\begin{macro}{\acs@affil@list}
%\begin{macro}{\acs@affil@list@aux}
% Footnotes are done in two stages.  First the main affiliation is
% handled, then the possible alternative. There is a need to check for
% the possibility that there is only one main affiliation but one or
% more alternative ones.
%    \begin{macrocode}
\newcommand*\acs@fnsymbol@org{}
\newcommand*\acs@affil@list{%
  \let\acs@fnsymbol@org\@fnsymbol
  \let\@fnsymbol\acs@author@fnsymbol
  \@tempcnta\z@\relax
  \@tempcntb\z@\relax
  \ifnum\acs@affil@cnt>\@ne\relax
    \expandafter\acs@affil@list@aux
  \else
    \ifnum\acs@affil@alt@cnt>\z@\relax
      \acs@affil@marker@cnt\@ne\relax
      \advance\acs@affil@marker@cnt\acs@footnote@cnt\relax
      \footnotetext[\acs@affil@marker@cnt]{\@affil@i}%
      \@tempcnta\@ne\relax
    \fi
  \fi
  \ifnum\acs@affil@alt@cnt>\z@\relax
    \expandafter\acs@affil@alt@list
  \fi
  \let\@fnsymbol\acs@fnsymbol@org
}
\newcommand*\acs@affil@list@aux{%
  \advance\@tempcnta\@ne\relax
  \acs@affil@marker@cnt\@tempcnta\relax
  \advance\acs@affil@marker@cnt\acs@footnote@cnt\relax
  \footnotetext[\acs@affil@marker@cnt]{%
    \@nameuse{@affil@\@roman\@tempcnta}%
  }%
  \ifnum\@tempcnta<\acs@affil@cnt\relax
    \expandafter\acs@affil@list@aux
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@affil@alt@list}
%\begin{macro}{\acs@affil@alt@lista@aux}
% The secondary loop for alternative affiliations is similar.
%    \begin{macrocode}
\newcommand*\acs@affil@alt@list{%
  \advance\@tempcntb\@ne\relax
  \acs@ifundefined{@altaffil@\@roman\@tempcntb}{}{%
    \acs@altaffil@foot@aux
  }
  \ifnum\@tempcntb<\acs@author@cnt\relax
    \expandafter\acs@affil@alt@list
  \fi
}
\newcommand*\acs@altaffil@foot@aux{%
  \advance\@tempcnta\@ne\relax
  \acs@affil@marker@cnt\@tempcnta\relax
  \advance\acs@affil@marker@cnt\acs@footnote@cnt\relax
  \footnotetext[\acs@affil@marker@cnt]{%
    \@nameuse{@altaffil@\@roman\@tempcntb}%
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@email@list@font}
%\begin{macro}{\acs@email@list}
%\begin{macro}{\acs@email@list@aux}
% The final piece of meta-data to print is the e-mail address list.
% The total number of e-mail addresses given it counted in
% \cs{@tempcntb}, which means a warning can be given if there are
% none.  The group is used so that \cs{UrlFont} can be set correctly.
%    \begin{macrocode}
\newcommand*\acs@email@list@font{\sf}
\newcommand*\acs@email@list{%
  \begingroup
    \def\UrlFont{\acs@email@list@font}%
    \@tempcnta\z@\relax
    \@tempcntb\z@\relax
    \acs@email@list@aux
    \ifnum\@tempcntb=\z@\relax
      \acs@warning{%
        No e-mail given:\MessageBreak
        at lest one author must have a contact e-mail%
      }%
    \fi
  \endgroup
}
\newcommand*\acs@email@list@aux{%
  \advance\@tempcnta\@ne\relax
  \ifnum\@tempcnta>\acs@author@cnt\relax\else
    \acs@ifundefined{@email@\@roman\@tempcnta}{}{%
      \advance\@tempcntb\@ne\relax
      \ifnum\@tempcntb>\@ne\relax
        ;
      \fi
      \expandafter\expandafter\expandafter\url\expandafter
        \expandafter\expandafter{%
           \csname @email@\@roman\@tempcnta\endcsname
      }%
    }%
    \expandafter\acs@email@list@aux
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@number@list}
%\begin{macro}{\acs@number@list@aux@i}
%\begin{macro}{\acs@number@list@aux@ii}
% Listing phone and fax numbers is easier as they don't have to be
% given. Everything is done in one block so that it is possible to know
% whether to add a new line and also to keep everything together.
%    \begin{macrocode}
\newcommand*\acs@number@list{%
  \begingroup
    \acs@number@list@aux@i{phone}%
    \let\@tempb\@tempa
    \acs@number@list@aux@i{fax}%  
    \ifx\@tempa\@empty\else
      \ifx\@tempb\@empty\else
        \protected@edef\@tempa{%
          \@tempb.\space\@tempa
        }%
      \fi
    \fi
    \ifx\@tempa\@empty\else
      \par
      \@tempa
    \fi
  \endgroup
}
\newcommand*\acs@number@list@aux@i[1]{%
  \def\@tempa{}%
  \@tempcnta\z@\relax
  \def\acs@number@list@aux@ii{%
    \advance\@tempcnta\@ne\relax
    \ifnum\@tempcnta>\acs@author@cnt\relax\else
      \acs@ifundefined{@#1@\@roman\@tempcnta}{}{%
        \acs@ifundefined{@email@\@roman\@tempcnta}{}{%
          \ifx\@tempa\@empty
            \edef\@tempa{%
              \@nameuse{@#1@\@roman\@tempcnta}%
            }%
          \else
            \edef\@tempa{%
              \@tempa
              ;
              \@nameuse{@#1@\@roman\@tempcnta}%
            }%
          \fi
        }%
      }%
      \expandafter\acs@number@list@aux@ii
    \fi
  }%
  \acs@number@list@aux@ii
  \ifx\@tempa\@empty\else
    \protected@edef\@tempa{%
      \MakeUppercase#1: \@tempa
    }%
  \fi
}
\newcommand*\acs@number@list@aux@ii{}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
% \begin{macro}{\endabstract}
% \begin{macro}{\acs@abstract@extras}
%    \begin{macrocode}
\g@addto@macro\endabstract{%
  \aftergroup\acs@abstract@extras
}
\newcommand*{\acs@abstract@extras}{%
  \ifacs@abbreviations
    \acs@abbreviations@print
    \par
  \fi
  \ifacs@keywords
    \acs@keywords@print
    \par
  \fi
}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%\begin{macro}{\acs@maketitle@extras}
%\begin{macro}{\acs@maketitle@extras@hook}
% A couple of things might need to be added to \cs{maketitle}.
%    \begin{macrocode}
\newcommand*\acs@maketitle@extras{%
  \acs@maketitle@extras@hook
}
\newcommand*\acs@maketitle@extras@hook{}
\g@addto@macro{\maketitle}{\acs@maketitle@extras}
%    \end{macrocode}
%\end{macro}
%\end{macro}
% \cs{maketitle} is required by the document class, and must start
% the document.  No variation is allowed, and so it is done
% automatically.
%    \begin{macrocode}
\g@addto@macro{\document}{\maketitle}
%    \end{macrocode}
%   
%\begin{environment}{scheme}
%\begin{environment}{chart}
%\begin{environment}{graph}
% Three new float types are provided, \texttt{scheme}, \texttt{chart}
% and \texttt{graph}.  These are the most obvious types; for graphs,
% a slight problem arises with the file extension.
%    \begin{macrocode}
\newfloat{scheme}{htbp}{los}
\floatname{scheme}{Scheme}
\newfloat{chart}{htbp}{loc}
\floatname{chart}{Chart}
\newfloat{graph}{htbp}{loh}
\floatname{graph}{Graph}
%    \end{macrocode}
%\end{environment}
%\end{environment}
%\end{environment}
%\begin{macro}{\schemename}
%\begin{macro}{\chartname}
%\begin{macro}{\graphname}
% Naming is set up in the same way as the kernel floats.
%    \begin{macrocode}
\newcommand*\schemename{Scheme}
\newcommand*\chartname{Chart}
\newcommand*\graphname{Graph}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
% The standard floats should appear ``here'' by default.
%    \begin{macrocode}
\floatplacement{table}{htbp}
\floatplacement{figure}{htbp}
\floatstyle{plaintop}
\restylefloat{table}
%    \end{macrocode}
%\begin{macro}{\acs@floatboxreset}
% Floats are all centred.
%    \begin{macrocode}
\let\acs@floatboxreset\@floatboxreset
\def\@floatboxreset{%
  \centering
  \acs@floatboxreset
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\plainref}
%\begin{macro}{\ref}
% For legacy support.
%    \begin{macrocode}
\newcommand*\plainref{}
\AtBeginDocument{\let\plainref\ref}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%   
%\begin{macro}{\acs@section}
%\begin{macro}{\acs@subsection}
%\begin{macro}{\acs@subsubsection}
%\begin{macro}{\acs@startsection}
% Both the numbering and existence of section headers may need to be
% altered. Some generic functions are therefore provided to deal with
% this cleanly. First, some original definitions are saved.
%    \begin{macrocode}
\newcommand*\acs@section{}
\let\acs@section\section
\newcommand*\acs@subsection{}
\let\acs@subsection\subsection
\newcommand*\acs@subsubsection{}
\let\acs@subsubsection\subsubsection
\newcommand*\acs@startsection{}
\let\acs@startsection\@startsection
%    \end{macrocode}
%\end{macro}
%\end{macro}  
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@startsection@alt}
% An alternative version of \cs{@startsection} which never adds numbers.
%    \begin{macrocode}
\newcommand*\acs@startsection@alt[6]{%
  \if@noskipsec \leavevmode \fi
  \par
  \@tempskipa #4\relax
  \@afterindenttrue
  \ifdim\@tempskipa<\z@\relax
    \@tempskipa -\@tempskipa \@afterindentfalse
  \fi
  \if@nobreak
    \everypar{}%
  \else
    \addpenalty\@secpenalty
    \addvspace\@tempskipa
  \fi
  \@ifstar{%
    \@ssect{#3}{#4}{#5}{#6}%
  }{%
    \@ssect{#3}{#4}{#5}{#6}%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\acs@sections@none}
%\begin{macro}{\acs@sections@none@aux}
% When removing sections entirely, a gobble macro is needed.
%    \begin{macrocode}
\newcommand*\acs@sections@none{%
  \@ifstar{%
    \acs@sections@none@aux
  }{%
    \acs@sections@none@aux
  }%
}
\newcommand*\acs@sections@none@aux[2][]{%
  \acs@warning{%
    (Sub)section `#2' ignored%
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\SectionNumbersOff}
%\begin{macro}{\SectionNumbersOn}
% To macros to add or remove the section numbers. The standard setting
% for the class has them on, but some configurations will turn them
% off. The names of these functions are both in design space so that
% users can change the decision easily.
%    \begin{macrocode}
\newcommand*\SectionNumbersOff{%
  \let\@startsection\acs@startsection@alt
}
\@onlypreamble\SectionNumbersOff
\newcommand*\SectionNumbersOn{%
  \let\@startsection\acs@startsection
}
\@onlypreamble\SectionNumbersOn
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\SectionsOff}
%\begin{macro}{\SectionsOn}
% Quite similar for entire sections.
%    \begin{macrocode}
\newcommand*\SectionsOff{%
  \let\section\acs@sections@none
  \let\subsection\acs@sections@none
  \let\subsubsection\acs@sections@none
}
\@onlypreamble\SectionsOff
\newcommand*\SectionsOn{%
  \let\section\acs@section
  \let\subsection\acs@subsection
  \let\subsubsection\acs@subsubsection
}
\@onlypreamble\SectionsOn
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{environment}{acknowledgement}
%\begin{environment}{suppinfo}
% Simple named sections.
%    \begin{macrocode}
\newenvironment{acknowledgement}{%
  \acs@subsection*{\acknowledgementname}%
}{}
\newenvironment{suppinfo}{%
  \acs@subsection*{\suppinfoname}%
  \acs@collect\acs@suppinfo@print
}{}
%    \end{macrocode}
%\end{environment}
%\end{environment}
%\begin{macro}{\acs@suppinfo@print}
% A simple macro to print the supporting information.
%    \begin{macrocode}
\newcommand\acs@suppinfo@print[1]{%
  #1
  This material is available free of charge via the Internet at
  \url{http://pubs.acs.org/}.
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\acknowledgementname}
%\begin{macro}{\bibsection}
%\begin{macro}{\suppinfoname}
% A few macros need to get around the changes.
%    \begin{macrocode}
\newcommand*\acknowledgementname{Acknowledgement}
\AtEndOfClass{%
  \def\bibsection{%
    \acs@subsection*{\refname}%
  }%
}
\newcommand*\suppinfoname{Supporting Information Available}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%
%\begin{macro}{\acs@abstract}
%\begin{macro}{\acs@endabstract}
%\begin{macro}{\acs@abstract@start}
%\begin{macro}{\acs@abstract@end}
%\begin{macro}{\acs@abstract@iffalse}
% Removing the abstract, if necessary, is done using a trick from the
% \pkg{comment} package. However, it code is copied here to keep
% requirements down.
%    \begin{macrocode}
\newcommand*\acs@abstract{}
\let\acs@abstract\abstract
\newcommand*\acs@endabstract{}
\let\acs@endabstract\endabstract
\begingroup
  \catcode`{ \active
  \catcode`} 12\relax
  \catcode`( 1\relax
  \catcode`) 2\relax
  \gdef\acs@abstract@start(%
    \acs@warning(%
      Abstract not allowed for this\MessageBreak
       manuscript type
    )%
    \@bsphack
    \catcode`{ \active
    \catcode`} 12\relax
    \let\end\fi
    \let{\acs@abstract@end% }
    \iffalse
  )%{
  \gdef\acs@abstract@end#1}(%
    \def\@tempa(#1)%
    \ifx\@tempa\@currenvir
      \@Esphack\endgroup
      \if@ignore
        \global\@ignorefalse
        \ignorespaces
      \fi
    \else
       \expandafter\acs@abstract@iffalse
    \fi
  )
\endgroup
\newcommand*\acs@iffalse{\iffalse}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\AbstractOff}
%\begin{macro}{\AbstractOn}
% A very similar pattern to before.
%    \begin{macrocode}
\newcommand*\AbstractOff{%
  \let\abstract\acs@abstract@start
  \let\endabstract\acs@abstract@end
}
\@onlypreamble\AbstractOff
\newcommand*\AbstractOn{%
  \let\abstract\acs@abstract
  \let\endabstract\acs@endabstract
}
\@onlypreamble\AbstractOn
%    \end{macrocode}
%\end{macro}
%\end{macro}
%   
%\begin{macro}{\acs@collect@toks}
%\begin{macro}{\acs@collect@content}
%\begin{macro}{\acs@collect@content}
% The content of the graphic TOC entry is processed using a method from
% \pkg{amsmath} \emph{via} \pkg{environ}. The entire environment is
% gathered for typesetting in a box. First, some storage is needed.
%    \begin{macrocode}
\newtoks\acs@collect@toks
\newtoks\acs@collect@empty@toks
\newcommand*\acs@collect@begins{}
\newcommand*\acs@collect@content{}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@collect}
%\begin{macro}{\acs@collect@aux}
%\begin{macro}{\acs@collect@begins@}
%\begin{macro}{\acs@collect@body}
% This is a \cs{long} version of \cs{collect@body}.
%    \begin{macrocode}
\newcommand\acs@collect[1]{%
  \acs@collect@toks{%
    \expandafter#1\expandafter{\the\acs@collect@toks}%
  }%
  \edef\acs@collect@content{%
    \the\acs@collect@toks
    \noexpand\end{\@currenvir}%
  }%
  \acs@collect@toks\acs@collect@empty@toks
  \def\acs@collect@begins{b}%
  \begingroup
    \expandafter\let\csname\@currenvir\endcsname\acs@collect@aux
    \edef\acs@collect@content{%
      \expandafter\noexpand\csname\@currenvir\endcsname
    }%
    \acs@collect@content
}
\newcommand*\acs@collect@aux{}
\long\def\acs@collect@aux#1\end#2{%
  \edef\acs@collect@begins{%
    \acs@collect@begins@#1\begin\end
    \expandafter\@gobble\acs@collect@begins
  }%
  \ifx\@empty\acs@collect@begins
    \endgroup
    \@checkend{#2}%
    \acs@collect@body{#1}%
  \else
    \acs@collect@body{#1\end{#2}}%
  \fi
  \acs@collect@content
}
\newcommand*\acs@collect@begins@{}
\long\def\acs@collect@begins@#1\begin#2{%
  \ifx\end#2\else
    b\expandafter\acs@collect@begins@
  \fi
}
\newcommand\acs@collect@body[1]{%
  \global\acs@collect@toks\expandafter{\the\acs@collect@toks#1}%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@abstract@print}
% Delayed abstract printing works in a similar way, but with some
% formatting `built-in'.
%    \begin{macrocode}
\newcommand\acs@abstract@print[1]{%
  \global\long\def\acs@abstract@text{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse\newpage
    \fi
    \acs@section*{Abstract}%
    #1%
    \if@restonecol
      \twocolumn
    \else
      \newpage
    \fi
  }%
  \AtEndDocument{\acs@abstract@text}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\acs@tocentry@print}
%\begin{macro}{\acs@tocentry@text}
% The same approach is taken for the graphical table of content
% printing. This is done in a box so that everything has a frame around
% it.
%    \begin{macrocode}
\newcommand\acs@tocentry@print[1]{%
  \global\long\def\acs@tocentry@text
    {%
      \if@twocolumn
        \@restonecoltrue\onecolumn
      \else
        \@restonecolfalse\newpage
      \fi
      \acs@section*{\tocentryname}%
      \tocsize
      \sffamily
      \singlespacing
      \begin{center}
        \fbox
          {%
            \begin{minipage}{\acs@tocentry@height}
              \vbox to \acs@tocentry@width{#1}%
            \end{minipage}%
          }%
      \end{center}%
      \if@restonecol
        \twocolumn
      \else
        \newpage
      \fi
    }%
  \AtEndDocument{\acs@tocentry@text}%
}
\newlength{\acs@tocentry@height}
\newlength{\acs@tocentry@width}
\setlength{\acs@tocentry@height}{9 cm}
\setlength{\acs@tocentry@width}{3.5 cm}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{environment}{tocentry}
% Actually creating the entry is pretty easy.
%    \begin{macrocode}
\newenvironment{tocentry}{\acs@collect\acs@tocentry@print}{}
%    \end{macrocode}
%\end{environment}
%\begin{macro}{\tocentryname}
% A simple name macro.
%    \begin{macrocode}
\newcommand*\tocentryname{Graphical TOC Entry}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\tocsize}
% The font size for printing the TOC entry.
%    \begin{macrocode}
\newcommand*\tocsize{%
  \@setfontsize\tocsize\@viiipt\@ixpt
}
%    \end{macrocode}
%\end{macro}
%   
%\begin{macro}{\acs@type@list}
%\begin{macro}{\acs@type@default}
%\begin{macro}{\acs@type@check}
% Different journals allow different types of article. A list is set
% up here: different journals can then alter it. A check function
% is also provided along with a default.
%    \begin{macrocode}
\newcommand*\acs@type@list{article,communication,suppinfo}
\newcommand*\acs@type@default{article}
\newcommand*\acs@type@check{%
  \@tempswafalse
  \@for\@tempa:=\acs@type@list\do{%
    \ifx\@tempa\acs@manuscript
      \expandafter\@tempswatrue
    \fi
  }%
  \if@tempswa\else
    \acs@warning{%
      Invalid manuscript type \acs@manuscript:\MessageBreak
      changed to default type \acs@type@default
    }%
    \let\acs@manuscript\acs@type@default
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%   
% Although \pkg{achemso} avoids too much formatting, the class file
% makes a few changes to keep life simple.  The name of the
% bibliography should be ``Notes and References'' if any notes are
% added.
%    \begin{macrocode}
\def\refname{%
  \ifnum\the\value{bibnote}>\z@\relax
    Notes and
  \fi
  References%
}
%    \end{macrocode}
%   
% A few bits for older versions.
%    \begin{macrocode}
\newcommand*\acs@setkeys{\setkeys{acs}}
\let\acs@killabstract\AbstractOff
\let\acs@killsecs\SectionsOff
\newcommand*\acs@validtype[2][article]{%
  \def\acs@type@default{#1}%
  \def\acs@type@list{#2}%
}
%    \end{macrocode}
% 
%\begin{macro}{\acs@par}
% A saved paragraph.
%    \begin{macrocode}
\newcommand*\acs@par{}
\let\acs@par\par
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\acs@layout@shared}
%\begin{environment}{acknowledgement}
%\begin{environment}{suppinfo}
% Some code is used generally when setting up ``press ready'' layouts.
% There is quite a bit here, mainly layout related.
%    \begin{macrocode}
\newcommand*\acs@layout@shared{%
  \AtBeginDocument{\singlespacing}%
  \twocolumn
  \tolerance=2000\relax
  \emergencystretch=10pt\relax
  \geometry{
    letterpaper,
    top    = 12.7mm,
    bottom = 16.8mm,
    left   = 19.3mm,
    right  = 19.3mm
  }%
  \setlength{\columnsep}{8.1mm}%
  \setlength{\parindent}{3.3mm}%
  \renewenvironment{acknowledgement}{%
    \def\@tempa{acknowledgement}%
    \ifx\@currenvir\@tempa
      \let\par\relax
      \acksize
      \vspace{6pt}%
      \textbf{\acknowledgementname}%
    \else
      \acs@subsection*{\acknowledgementname}%
    \fi
  }{%
    \acs@par
  }%
  \renewenvironment{suppinfo}{%
    \def\@tempa{suppinfo}%
    \ifx\@currenvir\@tempa
      \expandafter\acs@suppinfo@aux
    \else
      \acs@subsection*{\suppinfoname}%
    \fi
  }{%
    \acs@par
  }%
}
%    \end{macrocode}
%\end{environment}
%\end{environment}
%\end{macro}
%\begin{macro}{\acs@suppinfo@aux}
% A short spin out.
%    \begin{macrocode}
\newcommand*\acs@suppinfo@aux{%
  \let\par\relax
  \suppsize
  \vspace{6pt}%
  \textbf{\suppinfoname:}
  \acs@collect\acs@suppinfo@print
}
%    \end{macrocode}
%\end{macro} 
%\begin{macro}{\acksize}
%\begin{macro}{\suppsize}
% More sizes.
%    \begin{macrocode}
\newcommand*\acksize{\normalsize}
\newcommand*\suppsize{\normalsize}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@layout@nine}
%\begin{macro}{\@xipt}
%\begin{macro}{\acs@layout@ten}
% The class loads twelve point text. To reset it for print layouts, it
% is easiest to do things directly.
%    \begin{macrocode}
\newcommand*\acs@layout@nine{%
  \def\@xipt{11}%
  \long\def\normalsize{%
    \@setfontsize\normalsize\@ixpt\@xipt
  }%
  \normalsize
  \let\@listi\@listI
  \abovedisplayskip 5\p@ \@plus2\p@ \@minus 5\p@\relax
  \abovedisplayshortskip \z@ \@plus3\p@\relax
  \belowdisplayshortskip 3\p@ \@plus3\p@ \@minus 3\p@\relax
  \belowdisplayskip\abovedisplayskip\relax
  \abovecaptionskip 5\p@\relax
  \intextsep 7\p@ \@plus 2\p@ \@minus 2\p@\relax
}
\newcommand*\acs@layout@ten{%
  \long\def\normalsize{%
    \@setfontsize\normalsize\@xpt\@xiipt
  }%
  \normalsize
  \@setfontsize\normalsize\@xpt\@xiipt
  \let\@listi\@listI
  \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@\relax
  \abovedisplayshortskip \z@ \@plus3\p@\relax
  \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@\relax
  \belowdisplayskip \abovedisplayskip\relax
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%   
% With all of the standard settings done, the journal configuration can
% be loaded.   
%    \begin{macrocode}
\InputIfFileExists{\acs@journal.cfg}{}{%
  \acs@warning{%
    Unknown journal `\acs@journal':\MessageBreak
    using default configuration JACSAT%
  }%
  \input{jacsat.cfg}%
}
%    \end{macrocode}
% 
%\begin{macro}{\thepage}     
% Some changes that can always be applied if the manuscript type is
% appropriate: this saves some repetition in the configuration files.
%    \begin{macrocode}
\acs@type@check
\ifx\acs@manuscript\acs@manuscript@note
  \SectionsOff
\fi
\ifx\acs@manuscript\acs@manuscript@review
  \SectionsOn
  \SectionNumbersOn
\fi
\ifx\acs@manuscript\acs@manuscript@suppinfo
  \setkeys{acs}{maxauthors = 0}
  \def\thepage{S\arabic{page}}
  \renewcommand*\thefigure{S\@arabic\c@figure}
  \renewcommand*\thescheme{S\@arabic\c@scheme}
  \renewcommand*\thetable{S\@arabic\c@table}
  \AtBeginDocument
    {%
      \renewcommand*\citenumfont[1]{S#1}%
      \renewcommand*\bibnumfmt[1]{(S#1)}%
    }
\fi
%    \end{macrocode}  
%\end{macro}
%
% Set up two column layout.
%    \begin{macrocode}
\begingroup
  \def\@tempa{twocolumn}
  \ifx\acs@layout\@tempa
    \aftergroup\acs@layout@shared
  \fi
  \def\@tempa{two-column}
  \ifx\acs@layout\@tempa
    \aftergroup\acs@layout@shared
  \fi
\endgroup
%</class>
%    \end{macrocode}
%
%\subsection{Late shared code}
%
%\begin{macro}{\citenumfont}
% Changes to citations can now be made. The citation styles supplied
% here require \pkg{natbib}, which is loaded with the appropriate
% options. This part applies to the package as well as the class: it is
% here so that the load order is correct.
%    \begin{macrocode}
%<*class|package>
\ifacs@super
  \RequirePackage[sort&compress,numbers,super]{natbib}
\else
  \RequirePackage[sort&compress,numbers,round]{natbib}
  \def\citenumfont{\textit}
\fi
\RequirePackage{natmove}
%    \end{macrocode} 
%\end{macro}
% The \pkg{mciteplus} package allows the construction of lists of
% references with sub-letters. However, it might not be available, and
% so it is only loaded if available: the \file{.bst} files should work
% either way. There is also a patch to get cross-references correct
% with the modified \cs{ref} macro used here.
%    \begin{macrocode}
\IfFileExists{mciteplus.sty}{%
  \RequirePackage{mciteplus}
  \@ifpackagelater{mciteplus}{2008/09/31}
    {}
    {%
      \edef\@mciteNatbibCiteCmdList{\@mciteNatbibCiteCmdList,citenum}%
    }
%<*!package>
  \def\@mciteSubRef[##1]##2{\plainref{\@mcitereflabelprefix:##1:##2}}
%</!package>
}{}
%    \end{macrocode}
%
%\begin{macro}{\acs@bibstyle}
% The next step is to sort out bibliography formatting. With both the
% package and the class, the bibliography style is determined without
% user intervention. The style is stored as it may need to be
% altered later.
%    \begin{macrocode}
\newcommand*\acs@bibstyle{achemso}
\ifacs@biochem
  \def\acs@bibstyle{biochem}
  \bibliographystyle{biochem}
\else
  \bibliographystyle{achemso}
\fi
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\acs@bibliographystyle}
%\begin{macro}{\bibliographystyle}
% The original \cs{bibliographystyle} macro is now disabled: the
% underlying command is repeated otherwise problems cop up with
% \pkg{chapterbib}.
%    \begin{macrocode}
\newcommand*\acs@bibliographystyle{}
\let\acs@bibliographystyle\bibliographystyle
\def\bibliographystyle#1{%
  \acs@warning{\string\bibliographystyle\space ignored}%
  \expandafter\acs@bibliographystyle\expandafter{\acs@bibstyle}%
}
%</class|package>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%   
%\subsection{Late package-only code}
%
% The \pkg{notes2bib} code may or may not be activated.
%    \begin{macrocode}
%<*package>
\AtBeginDocument{%
  \@ifpackageloaded{notes2bib}{}{%
    \acs@niib@create
  }%
}
%</package>
%    \end{macrocode}
%   
%\subsection{Moving citations with \pkg{natbib}}
%
% The code for moving citations is created as a separate package, as
% the code needed is the same in both cases.
%    \begin{macrocode}
%<*natmove>
\ProvidesPackage{natmove}
  [2010/01/15 v1.1a Automatic citation moving with natbib]
\RequirePackage{natbib}
%    \end{macrocode}
%
%\begin{macro}{\nmv@ifmtarg}
%\begin{macro}{\nmv@xifmtarg}
% To keep down dependence on other packages, the very short code block
% from \pkg{ifmtarg} is copied here with an internal name.
%    \begin{macrocode}
\newcommand*\nmv@ifmtarg{}
\newcommand*\nmv@xifmtarg{}
\begingroup
  \catcode`\Q 3\relax
  \long\gdef\nmv@ifmtarg#1{%
    \nmv@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil
  }
  \long\gdef\nmv@xifmtarg#1#2Q#3#4#5\@nil{#4}
\endgroup
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\ifnmv@cite}
% A flag is need to watch whether \cs{cite} or another macro is in use.
%    \begin{macrocode}
\newif\ifnmv@cite
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\nmv@citex}
% Using the flag, either the new internal macro, or the \pkg{natbib}
% original, can be called.
%    \begin{macrocode}
\newcommand*\nmv@citex{%
  \ifnmv@cite
    \expandafter\nmv@citex@moving
  \else
    \expandafter\nmv@citex@nat
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\nmv@after}
% Later, the argument for \cs{cite} will need to be saved.
%    \begin{macrocode}
\newcommand*\nmv@after{}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\nmv@citex@moving}
% The new version of \cs{@citex} is needed that looks ahead of the
% citation using \cs{futurelet}.  There are three arguments to
% \cs{@citex} when using \pkg{natbib}.  Other than that, the trick
% used here is similar to that in \pkg{cite}.
%    \begin{macrocode}
\newcommand*\nmv@citex@moving{}
\def\nmv@citex@moving[#1][#2]#3{%
  \leavevmode
  \skip@\lastskip\relax
  \unskip
  \begingroup
    \def\nmv@after{\nmv@citex@nat[#1][#2]{#3}}%
    \global\nmv@citefalse
    \nmv@citex@get@next\relax
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\nmv@citex@end}
% To get things right at the end.
%    \begin{macrocode}
\newcommand*\nmv@citex@end{%
    \nmv@after
  \endgroup
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\nmv@citex@get@next}
%\begin{macro}{\nmv@citex@next}
% The next token on the input stack is saved into
% \cs{nmv@citex@next}, after gobbling up one token.
%    \begin{macrocode}
\newcommand*\nmv@citex@get@next[1]{%
  \futurelet\nmv@citex@next\nmv@citex@punct
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\nmv@citex@punct}
%\begin{macro}{\nmv@citex@punct@undouble}
%\begin{macro}{\nmv@citex@loop}
% The working macro for moving the punctuation.  This is very much
% like \cs{@citey} in the \pkg{cite} package. The initial assumption
% is that the loop will terminate, and so the recursion call will
% simply do the finalisation.
%    \begin{macrocode}
\newcommand*\nmv@citex@punct{%
  \let\nmv@citex@loop\nmv@citex@end
  \ifx\nmv@citex@next.\relax
    \ifnum\spacefactor<\nmv@citex@sfac\else
      \expandafter\expandafter\expandafter\nmv@citex@punct@undouble
    \fi
  \fi
  \expandafter\nmv@citex@punct@aux\natmovechars\@nil
  \nmv@citex@loop
}
\newcommand*\nmv@citex@punct@undouble{%
  \let\nmv@citex@next\relax
  \let\nmv@citex@loop\nmv@citex@get@next
}
\newcommand*\nmv@citex@loop{}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\nmv@citex@punct@aux}
% The final part of the punctuation moving system.
%    \begin{macrocode}
\newcommand*\nmv@citex@punct@aux[1]{%
  \ifx\nmv@citex@next#1\@empty
    #1%
    \let\nmv@citex@loop\nmv@citex@get@next
  \fi
  \ifx#1\@nil\else
    \expandafter\nmv@citex@punct@aux
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\nmv@citex@sfac}
% The value of the spacing factor after a full stop is used to signal
% doubled punctuation.  For French spacing, a bit of patching is
% needed.
%    \begin{macrocode}
\mathchardef\nmv@citex@sfac3000\relax
\expandafter\def\expandafter\frenchspacing\expandafter{%
  \frenchspacing
  \mathchardef\nmv@citex@sfac1001\relax
  \sfcode`\.\nmv@citex@sfac
  \sfcode`\?\nmv@citex@sfac
  \sfcode`\!\nmv@citex@sfac
}
\ifnum\sfcode`\.=\@m
  \frenchspacing
\fi
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\nmv@citex@nat}
%\begin{macro}{\nmv@activate}
%\begin{macro}{\cite}
% The swap has to be done at the beginning of the document. The
% internal flag from \pkg{natbib} is used, but under the
% circumstances we should be safe.  \cs{cite} is also patched to make
% the system active.
%    \begin{macrocode}
\newcommand*\nmv@citex@nat{}
\newcommand*\nmv@activate{%
  \let\nmv@citex@nat\@citex
  \let\@citex\nmv@citex
  \let\nmv@cite\cite
  \renewcommand*{\cite}[2][]{%
    \nmv@ifmtarg{##1}{%
      \nmv@citetrue
      \nmv@cite{##2}%
    }{%
      \nmv@citefalse
      \nmv@cite[##1]{##2}}%
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\nmv@natbib@detect}
% So that \pkg{natbib} options can be set without worrying about load
% order, \pkg{natmove} doesn't require \pkg{natbib}. So a test is needed
% to see if it is actually loaded. This is done as a macro so that the
% effect can be changed by \pkg{achemso}.
%    \begin{macrocode}
\newcommand*\nmv@natbib@detect{%
  \@ifpackageloaded{natbib}{%
    \ifNAT@super
      \expandafter\nmv@activate
    \fi
  }{%
    \PackageInfo{natmove}{%
      The natbib package is not loaded.\MessageBreak
      Loading natmove will do nothing
    }%
  }%
}
\AtBeginDocument{\nmv@natbib@detect}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\natmovechars}
% A user macro is needed for moving characters.
%    \begin{macrocode}
\newcommand*\natmovechars{.,;:}
%</natmove>
%    \end{macrocode}
%\end{macro}
%
%\subsection{The configuration files}
%
% The configuration files for different journals are not very complex.
% Keeping everything separate simply helps with maintenance.
%
%    \begin{macrocode}
%<*aamick>
\ProvidesFile{aamick.cfg}
  [2013/08/23 v3.8 achemso configuration: ACS Appl. Mater. Interfaces.]
\def\acs@type@list{article,letter,suppinfo}
%</aamick>
%<*acbcct>
\ProvidesFile{acbcct.cfg}
  [2013/08/23 v3.8 achemso configuration: ACS Chem. Biol.]
\setkeys{acs}{
  articletitle = true,
  biblabel     = fullstop,
  biochem      = true,
  super        = false
}
\def\acs@type@list{article,letter,review,suppinfo}
\SectionNumbersOff
%</acbcct>
%<*acbcct>
\ProvidesFile{accacs.cfg}
  [2013/08/23 v3.8 achemso configuration: ACS Catal.]
\setkeys{acs}{
 keywords = true,
}
\def\acs@type@list{article,letter,perspective,review,viewpoints,suppinfo}
\SectionNumbersOff
%</acbcct>
%<*achre4>
\ProvidesFile{achre4.cfg}
  [2013/08/23 v3.8 achemso configuration: Acc. Chem. Res.]
\setkeys{acs}{
  articletitle = true,
  biblabel     = plain
}
\def\acs@type@list{article,suppinfo}
\def\abstractname{Conspectus}
%</achre4>
%<*acncdm>
\ProvidesFile{acncdm.cfg}
  [2013/08/23 v3.8 achemso configuration: ACS Chem. Neurosci.]
\def\acs@type@list{article,review,letter,suppinfo,viewpoint}
\setkeys{acs}{
  articletitle = true,
  biblabel     = fullstop,
  biochem      = true,
  keywords     = true,
  super        = false
}
%</acncdm>
%<*acsccc>
\ProvidesFile{acsccc.cfg}
  [2013/08/23 v3.8 achemso configuration: ACS Combinatorial Sci.]
\def\acs@type@list{article,letter,review,perspective,account,note,suppinfo}
\setkeys{acs}{
  articletitle = true,
  keywords     = true
}
\SectionNumbersOff
%</acsccc>
%<*amlccd>
\ProvidesFile{amlccd.cfg}
  [2013/08/23 v3.8 achemso configuration: ACS Macro Lett.]
\def\acs@type@list{letter,suppinfo}
\SectionsOff
\setlength{\acs@tocentry@height}{8 cm}
\setlength{\acs@tocentry@width}{4 cm}
%</amlccd>
%<*amclct>
\ProvidesFile{amclct.cfg}
  [2013/08/23 v3.8 achemso configuration: ACS Med. Chem. Lett.]
\setkeys{acs}{
  articletitle = true
}
\def\acs@type@list{article,letter,perspective,suppinfo}
\SectionNumbersOff
%</amclct>
%<*ancac3>
\ProvidesFile{ancac3.cfg}
  [2013/08/23 v3.8 achemso configuration: ACS Nano]
\setkeys{acs}{
  articletitle = true,
  biblabel     = fullstop,
  etalmode     = truncate,
  maxauthors   = 10
}
\def\acs@type@list{article,perspective,suppinfo}
\newcommand*{\latin}[1]{\emph{#1}}
\SectionNumbersOff
%</ancac3>
%<*ancham>
\ProvidesFile{ancham.cfg}
  [2013/08/23 v3.8 achemso configuration: Anal. Chem.]
\def\acs@type@list{article,note,suppinfo}
\SectionNumbersOff
%</ancham>
%<*apchd5>
\ProvidesFile{apchd5.cfg}
  [2013/08/23 v3.8 achemso configuration: ACS Photon.]
\def\acs@type@list{article,letter,perspective,review,suppinfo}
%</apchd5>
%<*ascecg>
\ProvidesFile{ascecg.cfg}
  [2013/08/23 v3.8 achemso configuration: ACS Sustainable Chem Eng.]
\setkeys{articletitle = true, biblabel = fullstop}
\SectionNumbersOff
\def\acs@type@list{article,feature,letter,perspective,review,suppinfo}
%</ascecg>
%<*asbcd6>
\ProvidesFile{asbcd6.cfg}
  [2013/08/23 v3.8 achemso configuration: ACS Synth. Biol.]
\setkeys{acs}{
  abbreviations = true,
  articletitle  = true,
  biblabel      = fullstop,
  biochem       = true,
  keywords      = true,
  super         = false
}
\def\acs@type@list{article,letter,note,tutorial,review,suppinfo}
%</asbcd6>
%<*bichaw>
\ProvidesFile{biochem.cfg}
  [2013/08/23 v3.8 achemso configuration: Biochemistry]
\setkeys{acs}{
  abbreviations = true,
  articletitle  = true,
  biblabel      = fullstop,
  biochem       = true,
  keywords      = true,
  super         = false
}
\SectionNumbersOff
\def\acs@maketitle@extras@hook{%
  \par
  \acs@title@short@print
}
\g@addto@macro{\maketitle}{\newpage}
%    \end{macrocode}
%\begin{macro}{\acs@author@fnsymbol}
% Some changes to do with footnotes: symbols are different and symbol
% number one can only be used for the title.
%    \begin{macrocode}
\def\acs@author@fnsymbol#1{%
  \ensuremath{%
    \ifcase #1 *\or
      \dagger\or
        \ddagger\or
          \S\or
            \parallel\or
              \perp\or
                \P\or
                  \|\or
                    \bot\or
                      \#\or
                        @\or
                          \triangle\or
                            \nabla\else
                              #1%
    \fi
  }%
}
\def\@maketitle@title@hook{%
  \ifnum\acs@footnote@cnt>\@ne\relax\else
    \global\acs@footnote@cnt\@ne\relax
  \fi
}
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
%</bichaw>
%<*bcches>
\ProvidesFile{bcches.cfg}
  [2013/08/23 v3.8 achemso configuration: Bioconjugate Chem.]
\setkeys{acs}{
  articletitle = true,
  biochem      = true,
  super        = false
}
\SectionNumbersOff
%</bcches>
%<*bomaf6>
\ProvidesFile{bomaf6.cfg}
  [2013/08/23 v3.8 achemso configuration: Biomacromolecules]
\def\acs@type@list{article,comment,communication,note,review,suppinfo}
\SectionNumbersOff
\AtEndOfClass{\SectionsOn}
%</bomaf6>
%<*bipret>
\ProvidesFile{bipret.cfg}
  [2013/08/23 v3.8 achemso configuration: Biotechnol. Prog.]
\setkeys{acs}{
  articletitle = true,
  super        = false
}
\def\acs@type@list{article,review,suppinfo}
\SectionNumbersOff
%</bipret>
%<*crtoec>
\ProvidesFile{crtoec.cfg}
  [2013/08/23 v3.8 achemso configuration: Chem. Res. Toxicol.]
\setkeys{acs}{
  articletitle = true,
  biochem      = true,
  super        = false
}
\def\acs@type@list{%
  article,perspective,profile,review,suppinfo%
}
\SectionNumbersOff
%</crtoec>
%<*chreay>
\ProvidesFile{chreay.cfg}
  [2013/08/23 v3.8 achemso configuration: Chem. Rev.]
\def\acs@type@default{review}
\def\acs@type@list{review}
%    \end{macrocode}
% The references section is numbered in \emph{Chem.\ Rev.}
%    \begin{macrocode}
\def\bibsection{\acs@section{\refname}}
%</chreay>
%<*cmatex>
%    \begin{macrocode}
\ProvidesFile{cmatex.cfg}
  [2013/08/23 v3.8 achemso configuration: Chem. Mater.]
\SectionNumbersOff
\ifx\acs@manuscript\acs@manuscript@communication
  \AbstractOff
  \SectionsOff
\fi
%</cmatex>
%<*cgdefu>
\ProvidesFile{cgdefu.cfg}
  [2013/08/23 v3.8 achemso configuration: Cryst. Growth Des.]
\def\acs@type@list{%
  article,communication,perspective,suppinfo%
}
\SectionNumbersOff
\ifx\acs@manuscript\acs@manuscript@communication
  \SectionsOff
\fi
\setlength{\acs@tocentry@height}{8.9 cm}
\setlength{\acs@tocentry@width}{4.6 cm}
%</cgdefu>
%<*enfuem>
\ProvidesFile{enfuem.cfg}
  [2013/08/23 v3.8 achemso configuration: Energy Fuels]
\def\acs@type@list{article,review,suppinfo}
\SectionNumbersOff
%</enfuem>
%<*esthag>
\ProvidesFile{esthag.cfg}
  [2013/08/23 v3.8 achemso configuration: Environ. Sci. Technol.]
\setkeys{acs}{
  articletitle = true,
  super        = false
}
\def\acs@type@list{article,suppinfo}
\SectionNumbersOff
%</esthag>
%<*estlcu>
\ProvidesFile{estlcu.cfg}
  [2013/08/23 v3.8 achemso configuration: Environ. Sci. Technol. Lett.]
\setkeys{acs}{
  articletitle = true,
  super        = false
}
\def\acs@type@list{letter,suppinfo}
\SectionNumbersOff
%</estlcu>
%<*iecred>
\ProvidesFile{iecred.cfg}
  [2013/08/23 v3.8 achemso configuration: Ind. Eng. Chem. Res.]
\setkeys{acs}{
  articletitle = brackets,
  biblabel     = fullstop
}
\SectionNumbersOff
%</iecred>
%<*inoraj>
\ProvidesFile{inoraj.cfg}
  [2013/08/23 v3.8 achemso configuration: Inorg. Chem.]
\SectionNumbersOff
\ifx\acs@manuscript\acs@manuscript@communication
  \AbstractOff
  \SectionsOff
\fi
%</inoraj>
%    \end{macrocode}  
%
% The \emph{J.~Am.\ Chem.\ Soc.}~configuration is rather more
% complicated as there is the need to construct a ``galley-like''
% layout for communications.
%    \begin{macrocode}
%<*jacsat>
\ProvidesFile{jacsat.cfg}
  [2013/08/23 v3.8 achemso configuration: J. Am. Chem. Soc.]
\SectionNumbersOff
\ifx\acs@manuscript\acs@manuscript@communication\else
  \expandafter\endinput
\fi
%    \end{macrocode}
% Everything from here onward applies only to communications. Some
% adjustments are now made using the existing tools.
%    \begin{macrocode}
\setkeys{acs}{
  email  = true,
  layout = twocolumn
}
\SectionsOff
\acs@layout@nine
%    \end{macrocode}
%      
%\begin{environment}{abstract}
% The abstract appears at the start of the document, with lines around
% it.s
%    \begin{macrocode}
\renewenvironment{abstract}{%
  \hrule
  \vspace{2 mm}%
  \sffamily
  \noindent
  \emph{\textbf{Abstract:}}%
}{%
  \vspace{2 mm}%
  \hrule
  \vspace{6 mm}%
}
%    \end{macrocode}
%\end{environment}
%
%\begin{macro}{\acksize}
%\begin{macro}{\affilsize}
%\begin{macro}{\authorsize}
%\begin{macro}{\emailsize}
%\begin{macro}{\capsize}
%\begin{macro}{\refsize}
%\begin{macro}{\suppsize}
%\begin{macro}{\titlesize}
% To keep things logical, the size macros are given names related to
% their function. Some of these are new, some are defined in the class.
%    \begin{macrocode}
\def\affilsize{%
  \@setfontsize\affilsize\@ixpt\@xpt
}
\def\acksize{%
  \@setfontsize\acksize\@ixpt\@xipt
}
\def\authorsize{%
  \@setfontsize\authorsize{10.5}{12.5}%
}
\newcommand*\capsize{%
  \@setfontsize\capsize\@viiipt\@ixpt
}
\def\emailsize{%
  \@setfontsize\emailsize\@viiipt{15}%
}
\newcommand*\refsize{%
  \@setfontsize\refsize{7.5}{7.5}%
}
\def\suppsize{%
  \@setfontsize\suppsize{8.5}{10.5}%
}
\def\titlesize{%
  \@setfontsize\titlesize\@xiipt{13}%
}
\let\footnotesize\refsize
\let\captionfont\capsize
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\emailfont}
% A slight font change.
%    \begin{macrocode}
\def\emailfont{\sffamily}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\ps@plain}
%\begin{macro}{\ps@jacs}
% The header styles are done the hard way, to keep down the number of
% packages loaded.
%    \begin{macrocode}
\def\ps@plain{%
  \let\@mkboth\@gobbletwo
  \let\@oddhead\@empty
  \def\@oddfoot{%
    \reset@font
    \sffamily
    \textbf{\thepage}%
    \hfil
  }%
  \let\@evenhead\@empty
  \let\@evenfoot\@oddfoot
}
\def\ps@acs{%
  \def\@oddfoot{%
    \reset@font
    \sffamily
    \textbf{\thepage}%
    \hfil
  }%
  \def\@evenfoot{%
    \reset@font
    \hfil
    \sffamily
    \textbf{\thepage}%
  }%
  \def\@oddhead{}%
  \let\@evenhead\@oddhead
}
\pagestyle{acs}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@space@pre@title}
%\begin{macro}{\acs@space@post@title}
%\begin{macro}{\acs@space@post@author}
%\begin{macro}{\acs@space@post@address}
%\begin{macro}{\acs@space@post@email}
% Length adjustments for the title.
%    \begin{macrocode}
\setlength\acs@space@pre@title{16mm}
\setlength\acs@space@post@title{0mm}
\setlength\acs@space@post@author{0mm}
\setlength\acs@space@post@address{0mm}
\setlength\acs@space@post@email{-1mm}
\setlength\acs@maketitle@width{152.4mm}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\acs@contact@details}
% Contact details are different here.
%    \begin{macrocode}
\def\acs@contact@details{%
  Received \today; E-mail: \acs@email@list
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\acs@author@list@star}
%\begin{macro}{\acs@maketitle@extras}
% No star in the footnotes in \emph{J.~Am.\ Chem.\ Soc.}, and no
% keywords or abbreviations.
%    \begin{macrocode}
\let\acs@author@list@star\relax
\let\acs@maketitle@extras\relax
%    \end{macrocode}
%\end{macro}
%\end{macro}
% Getting the floats correct is a difficult task ``by hand''; using
% the \pkg{caption} package makes this a lot easier.
%    \begin{macrocode}
\floatstyle{plaintop}
\restylefloat{scheme}
\floatstyle{plain}
\DeclareCaptionLabelSeparator{perquad}{.\quad}
\captionsetup{
  singlelinecheck = off,
  labelfont       = {bf,it,sf},
  textfont        = sf,
  labelsep        = perquad
}
\captionsetup[figure]{textfont=rm}
%    \end{macrocode}
%\begin{macro}{\acs@table}
%\begin{macro}{\table}
% A patch or \cs{table}.
%    \begin{macrocode}
\newcommand*\acs@table{}
\let\acs@table\table
\def\table{%
  \capsize
  \acs@table
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
% The bibliography has to be adjusted.
%    \begin{macrocode}
\AtBeginDocument{%
  \def\bibsection{%
    \@startsection
      {section}
      {1}
      {\z@}{\z@}{2.5mm}%
      {\normalfont\acksize\bfseries}
      {\hrule\nobreak\vspace{1.2mm}\noindent\refname}%
  }%
  \let\bibfont\refsize
  \setlength{\bibhang}{0.61cm}%
  \setlength{\bibsep}{0mm}%
}
%</jacsat>
%    \end{macrocode}
%   
%    \begin{macrocode}
%<*jafcau>
\ProvidesFile{jafcau.cfg}
  [2013/08/23 v3.8 achemso configuration: J. Agric. Food Chem.]
\setkeys{acs}{
  articletitle = true,
  super        = false
}
\def\acs@type@list{article,suppinfo}
\SectionNumbersOff
%</jafcau>
%<*jceaax>
\ProvidesFile{jceaax.cfg}
  [2013/08/23 v3.8 achemso configuration: J. Chem. Eng. Data]
\setkeys{acs}{
  articletitle = true
}
\def\acs@type@list{article,suppinfo}
\def\refname{Literature Cited}
\SectionNumbersOff
%</jceaax>
%<*jceda8>
\ProvidesFile{jceda8.cfg}
  [2013/08/23 v3.8 achemso configuration: J. Chem. Ed.]
\SectionNumbersOff
\setkeys{acs}{
  articletitle = true
}
\def\acs@type@list{article,suppinfo}
\SectionNumbersOff
%</jceda8>
%<*jcisd8>
\ProvidesFile{jcisd8.cfg}
  [2013/08/23 v3.8 achemso configuration: J. Chem. Inf. Model.]
\setkeys{acs}{
  articletitle = true
}
\def\acs@type@list{article,suppinfo}
\SectionNumbersOff
%</jcisd8>
%<*jctcce>
\ProvidesFile{jctcce.cfg}
  [2013/08/23 v3.8 achemso configuration: J. Chem. Theory Comput.]
\def\acs@type@list{article,suppinfo}
\setkeys{acs}{
  maxauthors = 0
}
%</jctcce>
%<*jmcmar>
\ProvidesFile{jmcmar.cfg}
  [2013/08/23 v3.8 achemso configuration: J. Med. Chem.]
\setkeys{acs}{
  articletitle = true
}
\def\acs@type@list{article,letter,perspective,suppinfo}
\SectionNumbersOff
%</jmcmar>
%<*jnprdf>
\ProvidesFile{jnprdf.cfg}
  [2013/08/23 v3.8 achemso configuration: J. Nat. Prod.]
\renewcommand*{\abstractname}{ABSTRACT}
\renewcommand*{\acknowledgementname}{ACKNOWLEDGEMENT}
\renewcommand*{\suppinfoname}{ASSOCIATED CONTENT}
\SectionNumbersOff
\renewcommand*{\acs@abstract}{%
  \quotation
  \textbf{\abstractname :}%
}
\AbstractOn
\ifx\acs@manuscript\acs@manuscript@communication
  \AbstractOff
  \SectionsOff
\fi
\def\refname{%
  \ifnum\the\value{bibnote}>\z@\relax
    NOTES AND
  \fi
  REFERENCES%
}
\captionsetup{
  labelfont = bf,
  labelsep  = period
}
\renewcommand\acs@suppinfo@print[1]{%
  \textbf{Supporting Information}%
  #1
  This material is available free of charge via the Internet at
  \url{http://pubs.acs.org/}.
}
%</jnprdf>
%<*joceah>
\ProvidesFile{joceah.cfg}
  [2013/08/23 v3.8 achemso configuration: J. Org. Chem.]
\ifx\acs@manuscript\acs@manuscript@communication
  \AbstractOff
  \SectionsOff
\fi
\floatstyle{plaintop}
\restylefloat{scheme}
\floatstyle{plain}
%</joceah>
%    \end{macrocode}
%    \begin{macrocode}
%<*jpcafh>
\ProvidesFile{jpcafh.cfg}
  [2013/08/23 v3.8 achemso configuration: J. Phys. Chem. A]
\def\acs@type@list{article,suppinfo}
\setkeys{acs}{articletitle = true, keywords = true}
\SectionNumbersOff
\captionsetup[table]{labelfont=bf,textfont=bf}
%    \end{macrocode}
% Title
%    \begin{macrocode}
\g@addto@macro{\maketitle}{\newpage}
%</jpcafh>
%<*jpcbfk>
\ProvidesFile{jpcbfk.cfg}
  [2013/08/23 v3.8 achemso configuration: J. Phys. Chem. B]
\def\acs@type@list{article,suppinfo}
\setkeys{acs}{articletitle = true, keywords = true}
\SectionNumbersOff
\captionsetup[table]{labelfont=bf,textfont=bf}
\g@addto@macro{\maketitle}{\newpage}
%</jpcbfk>
%<*jpccck>
\ProvidesFile{jpccck.cfg}
  [2013/08/23 v3.8 achemso configuration: J. Phys. Chem. C]
\def\acs@type@list{article,suppinfo}
\setkeys{acs}{articletitle = true, keywords = true}
\SectionNumbersOff
\captionsetup[table]{labelfont=bf,textfont=bf}
\g@addto@macro{\maketitle}{\newpage}
%</jpccck>
%    \end{macrocode}
%    \begin{macrocode}
%<*jpclcd>
\ProvidesFile{jpclcd.cfg}
  [2013/08/23 v3.8 achemso configuration: J. Phys. Chem. Lett.]
\setkeys{acs}{articletitle = true, etalmode = truncate, maxauthors = 10}
\def\acs@type@default{letter}
\def\acs@type@list{letter}
\SectionNumbersOff
\captionsetup[table]{labelfont=bf,textfont=bf}
\g@addto@macro{\maketitle}{\newpage}
%</jpclcd>
%<*jprobs>
\ProvidesFile{jprobs.cfg}
  [2013/08/23 v3.8 achemso configuration: J. Proteome Res.]
\setkeys{acs}{
  articletitle = true
}
\def\acs@type@list{article,review,suppinfo}
\SectionNumbersOff
%</jprobs>
%<*langd5>
\ProvidesFile{langd5.cfg}
  [2013/08/23 v3.8 achemso configuration: Langmuir]
\def\acs@type@list{article,letter,suppinfo}
\setkeys{acs}{articletitle = true}
\SectionNumbersOff
%</langd5>
%<*mamobx>
\ProvidesFile{mamobx.cfg}
  [2013/08/23 v3.8 achemso configuration: Macromolecules]
\SectionNumbersOff
%</mamobx>
%<*mpohbp>
\ProvidesFile{mamobx.cfg}
  [2013/08/23 v3.8 achemso configuration: Mol. Pharm.]
\setkeys{acs}{articletitle = true}
\def\acs@type@list{article,suppinfo}
\SectionNumbersOff
%</mpohbp>
%<*nalefd>
\ProvidesFile{nalefd.cfg}
  [2013/08/23 v3.8 achemso configuration: Nano Lett.]
\setkeys{acs}{keywords = true}
\def\acs@type@default{letter}
\def\acs@type@list{letter}
\SectionNumbersOff
%</nalefd>
%<*orlef7>
\ProvidesFile{orlef7.cfg}
  [2013/08/23 v3.8 achemso configuration: Org. Lett.]
\def\acs@type@default{letter}
\def\acs@type@list{letter}
\SectionsOff
\setkeys{acs}{layout = twocolumn}
\RequirePackage{xcolor}
\definecolor{orglett}{RGB}{128,0,0}
%</orlef7>
%<*oprdfk>
\ProvidesFile{oprdfk.cfg}
  [2013/08/23 v3.8 achemso configuration: Org. Proc. Res. Dev.]
\def\acs@type@list{article,highlight,review,suppinfo}
\SectionNumbersOff
%</oprdfk>
%<*orgnd7>
\ProvidesFile{orgnd7.cfg}
  [2013/08/23 v3.8 achemso configuration: Organometallics]
\SectionNumbersOff
%</orgnd7>
%    \end{macrocode}
%
%\Finale
%
%\iffalse
%<*demo>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% This is a (brief) model paper using the achemso class
%% The document class accepts keyval options, which should include
%% the target journal and optionally the manuscript type.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[journal=jacsat,manuscript=article]{achemso}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Place any additional packages needed here.  Only include packages
%% which are essential, to avoid problems later. Do NOT use any
%% packages which require e-TeX (for example etoolbox): the e-TeX
%% extensions are not currently available on the ACS conversion
%% servers.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[version=3]{mhchem} % Formula subscripts using \ce{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% If issues arise when submitting your manuscript, you may want to
%% un-comment the next line.  This provides information on the
%% version of every file you have used.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%\listfiles

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Place any additional macros here.  Please use \newcommand* where
%% possible, and avoid layout-changing macros (which are not used
%% when typesetting).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand*\mycommand[1]{\texttt{\emph{#1}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Meta-data block
%% ---------------
%% Each author should be given as a separate \author command.
%%
%% Corresponding authors should have an e-mail given after the author
%% name as an \email command. Phone and fax numbers can be given
%% using \phone and \fax, respectively; this information is optional.
%%
%% The affiliation of authors is given after the authors; each
%% \affiliation command applies to all preceding authors not already
%% assigned an affiliation.
%%
%% The affiliation takes an option argument for the short name.  This
%% will typically be something like "University of Somewhere".
%%
%% The \altaffiliation macro should be used for new address, etc.
%% On the other hand, \alsoaffiliation is used on a per author basis
%% when authors are associated with multiple institutions.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\author{Andrew N. Other}
\altaffiliation{A shared footnote}
\author{Fred T. Secondauthor}
\altaffiliation{Current address: Some other place, Othert\"own,
Germany}
\author{I. Ken Groupleader}
\altaffiliation{A shared footnote}
\email{i.k.groupleader@unknown.uu}
\phone{+123 (0)123 4445556}
\fax{+123 (0)123 4445557}
\affiliation[Unknown University]
{Department of Chemistry, Unknown University, Unknown Town}
\alsoaffiliation[Second University]
{Department of Chemistry, Second University, Nearby Town}
\author{Susanne K. Laborator}
\email{s.k.laborator@bigpharma.co}
\affiliation[BigPharma]
{Lead Discovery, BigPharma, Big Town, USA}
\author{Kay T. Finally}
\affiliation[Unknown University]
{Department of Chemistry, Unknown University, Unknown Town}
\alsoaffiliation[Second University]
{Department of Chemistry, Second University, Nearby Town}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% The document title should be given as usual. Some journals require
%% a running title from the author: this should be supplied as an
%% optional argument to \title.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title[An \textsf{achemso} demo]
  {A demonstration of the \textsf{achemso} \LaTeX\
   class\footnote{A footnote for the title}}
  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Some journals require a list of abbreviations or keywords to be
%% supplied. These should be set up here, and will be printed after
%% the title and author information, if needed.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\abbreviations{IR,NMR,UV}
\keywords{American Chemical Society, \LaTeX}

\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% The manuscript does not need to include \maketitle, which is
%% executed automatically.  The document should begin with an
%% abstract, if appropriate.  If one is given and should not be, the
%% contents will be gobbled.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{abstract}
  This is an example document for the \textsf{achemso} document
  class, intended for submissions to the American Chemical Society
  for publication. The class is based on the standard \LaTeXe\
  \textsf{report} file, and does not seek to reproduce the appearance
  of a published paper.

  This is an abstract for the \textsf{achemso} document class
  demonstration document.  An abstract is only allowed for certain
  manuscript types.  The selection of \texttt{journal} and
  \texttt{manuscript} will determine if an abstract is valid.  If
  not, the class will issue an appropriate error.
\end{abstract}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Start the main part of the manuscript here.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
This is a paragraph of text to fill the introduction of the
demonstration file.  The demonstration file attempts to show the
modifications of the standard \LaTeX\ macros that are implemented by
the \textsf{achemso} class.  These are mainly concerned with content,
as opposed to appearance.

\section{Results and discussion}

\subsection{Outline}

The document layout should follow the style of the journal concerned.
Where appropriate, sections and subsections should be added in the
normal way. If the class options are set correctly, warnings will be
given if these should not be present.

\subsection{References}

The class makes various changes to the way that references are
handled.  The class loads \textsf{natbib}, and also the
appropriate bibliography style.  References can be made using
the normal method; the citation should be placed before any
punctuation, as the class will move it if using a superscript
citation style
\cite{Mena2000,Abernethy2003,Friedman-Hill2003,EuropeanCommission2008}.
The use of \textsf{natbib} allows the use of the various citation
commands of that package: \citeauthor{Abernethy2003} have shown
something, in \citeyear{Cotton1999}, or as given by
Ref.~\citenum{Mena2000}.  Long lists of authors will be
automatically truncated in most article formats, but not in
supplementary information or reviews \cite{Pople2003}. If you
encounter problems with the citation macros, please check that
your copy of \textsf{natbib} is up to date. The demonstration
database file \texttt{achemso-demo.bib} shows how to complete
entries correctly. Notice that ``\latin{et al.}'' is auto-formatted
using the \texttt{\textbackslash latin} command.

Multiple citations to be combined into a list can be given as
a single citation.  This uses the \textsf{mciteplus} package
\cite{Johnson1972,*Arduengo1992,*Eisenstein2005,*Arduengo1994}. 
Citations other than the first of the list should be indicated
with a star. If the \textsf{mciteplus} package is not installed,
the standard bibliography tools will still work but starred
references will be ignored. Individual references can be referred
to using \texttt{\textbackslash mciteSubRef}:
``ref.~\mciteSubRef{Eisenstein2005}''.

The class also handles notes to be added to the bibliography.  These
should be given in place in the document \bibnote{This is a note.
The text will be moved the the references section.  The title of the
section will change to ``Notes and References''.}.  As with
citations, the text should be placed before punctuation.  A note is
also generated if a citation has an optional note.  This assumes that
the whole work has already been cited: odd numbering will result if
this is not the case \cite[p.~1]{Cotton1999}.

\subsection{Floats}

New float types are automatically set up by the class file.  The
means graphics are included as follows (Scheme~\ref{sch:example}).  As
illustrated, the float is ``here'' if possible.
\begin{scheme}
  Your scheme graphic would go here: \texttt{.eps} format\\
  for \LaTeX\, or \texttt{.pdf} (or \texttt{.png}) for pdf\LaTeX\\
  \textsc{ChemDraw} files are best saved as \texttt{.eps} files:\\
  these can be scaled without loss of quality, and can be\\
  converted to \texttt{.pdf} files easily using \texttt{eps2pdf}.\\
  %\includegraphics{graphic}
  \caption{An example scheme}
  \label{sch:example}
\end{scheme}

\begin{figure}
  As well as the standard float types \texttt{table}\\
  and \texttt{figure}, the class also recognises\\
  \texttt{scheme}, \texttt{chart} and \texttt{graph}.
  \caption{An example figure}
  \label{fgr:example}
\end{figure}

Charts, figures and schemes do not necessarily have to be labelled or
captioned.  However, tables should always have a title. It is
possible to include a number and label for a graphic without any
title, using an empty argument to the \texttt{\textbackslash caption}
macro.

The use of the different floating environments is not required, but
it is intended to make document preparation easier for authors. In
general, you should place your graphics where they make logical
sense; the production process will move them if needed.

\subsection{Math(s)}

The \textsf{achemso} class does not load any particular additional
support for mathematics.  If packages such as \textsf{amsmath} are
required, they should be loaded in the preamble.  However,
the basic \LaTeX\ math(s) input should work correctly without
this.  Some inline material \( y = mx + c \) or $ 1 + 1 = 2 $
followed by some display. \[ A = \pi r^2 \]

It is possible to label equations in the usual way (Eq.~\ref{eqn:example}).
\begin{equation}
  \frac{\mathrm{d}}{\mathrm{d}x} \, r^2 = 2r \label{eqn:example}
\end{equation}
This can also be used to have equations containing graphical
content. To align the equation number with the middle of the graphic,
rather than the bottom, a minipage may be used.
\begin{equation}
  \begin{minipage}[c]{0.80\linewidth}
    \centering
    As illustrated here, the width of \\
    the minipage needs to allow some  \\
    space for the number to fit in to.
    %\includegraphics{graphic}
  \end{minipage}
  \label{eqn:graphic}
\end{equation}

\section{Experimental}

The usual experimental details should appear here.  This could
include a table, which can be referenced as Table~\ref{tbl:example}.
Notice that the caption is positioned at the top of the table.
\begin{table}
  \caption{An example table}
  \label{tbl:example}
  \begin{tabular}{ll}
    \hline
    Header one  & Header two  \\
    \hline
    Entry one   & Entry two   \\
    Entry three & Entry four  \\
    Entry five  & Entry five  \\
    Entry seven & Entry eight \\
    \hline
  \end{tabular}
\end{table}

Adding notes to tables can be complicated.  Perhaps the easiest
method is to generate these using the basic
\texttt{\textbackslash textsuperscript} and
\texttt{\textbackslash emph} macros, as illustrated (Table~\ref{tbl:notes}).
\begin{table}
  \caption{A table with notes}
  \label{tbl:notes}
  \begin{tabular}{ll}
    \hline
    Header one                            & Header two \\
    \hline
    Entry one\textsuperscript{\emph{a}}   & Entry two  \\
    Entry three\textsuperscript{\emph{b}} & Entry four \\
    \hline
  \end{tabular}

  \textsuperscript{\emph{a}} Some text;
  \textsuperscript{\emph{b}} Some more text.
\end{table}

The example file also loads the optional \textsf{mhchem} package, so
that formulas are easy to input: \texttt{\textbackslash ce\{H2SO4\}}
gives \ce{H2SO4}.  See the use in the bibliography file (when using
titles in the references section).

The use of new commands should be limited to simple things which will
not interfere with the production process.  For example,
\texttt{\textbackslash mycommand} has been defined in this example,
to give italic, mono-spaced text: \mycommand{some text}.

\section{Extra information when writing JACS Communications}

When producing communications for \emph{J.~Am.\ Chem.\ Soc.}, the
class will automatically lay the text out in the style of the
journal. This gives a guide to the length of text that can be
accommodated in such a publication. There are some points to bear in
mind when preparing a JACS Communication in this way.  The layout
produced here is a \emph{model} for the published result, and the
outcome should be taken as a \emph{guide} to the final length. The
spacing and sizing of graphical content is an area where there is
some flexibility in the process.  You should not worry about the
space before and after graphics, which is set to give a guide to the
published size. This is very dependant on the final published layout.

You should be able to use the same source to produce a JACS
Communication and a normal article.  For example, this demonstration
file will work with both \texttt{type=article} and
\texttt{type=communication}. Sections and any abstract are
automatically ignored, although you will get warnings to this effect.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% The "Acknowledgement" section can be given in all manuscript
%% classes.  This should be given within the "acknowledgement"
%% environment, which will make the correct section or running title.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{acknowledgement}

Please use ``The authors thank \ldots'' rather than ``The
authors would like to thank \ldots''.

The author thanks Mats Dahlgren for version one of \textsf{achemso},
and Donald Arseneau for the code taken from \textsf{cite} to move
citations after punctuation. Many users have provided feedback on the
class, which is reflected in all of the different demonstrations
shown in this document.

\end{acknowledgement}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% The same is true for Supporting Information, which should use the
%% suppinfo environment.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{suppinfo}

This will usually read something like: ``Experimental procedures and
characterization data for all new compounds. The class will
automatically add a sentence pointing to the information on-line:

\end{suppinfo}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% The appropriate \bibliography command should be placed here.
%% Notice that the class file automatically sets \bibliographystyle
%% and also names the section correctly.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibliography{achemso-demo}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% The "tocentry" environment can be used to create an entry for the
%% graphical table of contents.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{tocentry}

Some journals require a graphical entry for the Table of Contents.
This should be laid out ``print ready'' so that the sizing of the
text is correct.

Inside the \texttt{tocentry} environment, the font used is Helvetica
8\,pt, as required by \emph{Journal of the American Chemical
Society}.

The surrounding frame is 9\,cm by 3.5\,cm, which is the maximum
permitted for  \emph{Journal of the American Chemical Society}
graphical table of content entries. The box will not resize if the
content is too big: instead it will overflow the edge of the box.

This box and the associated title will always be printed on a
separate page at the end of the document.

\end{tocentry}

\end{document}
%</demo>
%<*bst>
% Database entries

ENTRY
  {
    address
    author
    booktitle
    chapter
    ctrl-article-title
    ctrl-chapter-title
    ctrl-etal-firstonly
    ctrl-etal-number
    ctrl-use-title
    doi
    edition
    editor
    howpublished
    institution
    journal
    key
    maintitle
    note
    number
    organization
    pages
    publisher
    school
    series
    title
    type
    url
    version
    volume
    year
  }
  { }
  {
    label
    short.names
  }
 
% Generic logic functions, from the core BibTeX styles

FUNCTION { and } {
    { }
    {
      pop$
      #0
    }
  if$ 
}

FUNCTION { not } {
    { #0 }
    { #1 }
  if$ 
}

FUNCTION { or } {
    {
      pop$
      #1
    }
    { }
  if$ 
}

FUNCTION { xor } {
    { not }
    { }
  if$ 
}
 
% Generic functions for basic manipulations: many of these
% come from the core BibTeX styles or 'Tame the BeaST'

FUNCTION { chr.to.value.error } {
  #48 +
  int.to.chr$
  "'" swap$ *
  "'" *
  " is not a number: treated as zero." *
  warning$
  #0
}

FUNCTION { chr.to.value } {
  chr.to.int$ #48 -
  duplicate$
  #0 <
    { chr.to.value.error }
    {
      duplicate$
      #9 >
        { chr.to.value.error }
        { }
      if$ 
    }
  if$ 
}

STRINGS {
  extract.input.str
  extract.output.str
}

FUNCTION { is.a.digit } {
  duplicate$
  "" =
    {
      pop$
      #0
    }
    {
      chr.to.int$
      #48 -
      duplicate$
     #0 < swap$ #9 > or not
   }
  if$
}

FUNCTION{ is.a.number } {
  {
    duplicate$
    #1 #1 substring$
    is.a.digit
  }
    { #2 global.max$ substring$ }
  while$
  "" =
}

FUNCTION { extract.number } {
  duplicate$
  'extract.input.str :=
  "" 'extract.output.str :=
  { extract.input.str empty$ not }
    {
      extract.input.str #1 #1 substring$
      extract.input.str #2 global.max$ substring$ 'extract.input.str :=
      duplicate$
      is.a.number
        { extract.output.str swap$ * 'extract.output.str := }
        {
          pop$
          "" 'extract.input.str :=
        }
      if$
    }
  while$
  extract.output.str empty$
    { }
    {
      pop$
      extract.output.str
    }
  if$
}

FUNCTION { field.or.null } {
  duplicate$
  empty$
    {
      pop$
      ""
    }
    { }
  if$
}

INTEGERS {
  multiply.a.int
  multiply.b.int
}

FUNCTION { multiply } {
  'multiply.a.int :=
  'multiply.b.int :=
  multiply.b.int #0 <
    {
      #-1
      #0 multiply.b.int - 'multiply.b.int :=
    }
    { #1 }
  if$
  #0
  { multiply.b.int #0 > } 
    {
      multiply.a.int +
      multiply.b.int #1 - 'multiply.b.int :=
    }
  while$
  swap$
    { }
    { #0 swap$ - }
  if$ 
}

INTEGERS { str.conversion.int }

FUNCTION { str.to.int.aux.ii } {
  {
    duplicate$
    empty$ not
  }
    {
      swap$
      #10 multiply 'str.conversion.int :=
      duplicate$
      #1 #1 substring$
      chr.to.value
      str.conversion.int +
      swap$
      #2 global.max$ substring$
    }
  while$
  pop$
}

FUNCTION { str.to.int.aux.i } {
  duplicate$
  #1 #1 substring$
  "-" =
   {
      #1 swap$
      #2 global.max$ substring$
    }
    {
      #0 swap$
    }
  if$ 
  #0
  swap$
  str.to.int.aux.ii
  swap$
    { #0 swap$ - }
    { }
  if$
}

FUNCTION { str.to.int } {
  duplicate$
  empty$
    {
      pop$
      #0
    }
    { str.to.int.aux.i }
  if$ 
}

FUNCTION { tie.or.space.connect } {
 duplicate$
 text.length$ #3 <
    { "~" }
    { " " }
  if$
  swap$ * *
}

FUNCTION { yes.no.to.bool } {
  duplicate$
  empty$
    {
      pop$
      #0
    }
    {
      "l" change.case$
      "yes" =
        { #1 }
        { #0 }
      if$ 
    }
  if$ 
}

% Functions of formatting

FUNCTION { bold } {
  duplicate$
  empty$
    {
      pop$
      ""
    }
    { "\textbf{" swap$ * "}" * }
  if$
}

FUNCTION { emph } {
  duplicate$
  empty$
    {
      pop$
      ""
    }
    { "\emph{" swap$ * "}" * }
  if$
}


FUNCTION { paren } {
  duplicate$
  empty$
    {
      pop$
      ""
    }
    { "(" swap$ * ")" * }
  if$
}

% Functions for punctuation

FUNCTION { add.comma } { ", " * }

FUNCTION { add.colon } {  ": " * }

FUNCTION { add.period } { add.period$ " " * }

FUNCTION { add.semicolon } { "; " * }

FUNCTION { add.space } { " " * }

% Bibliography strings: fixed values collected into functions

FUNCTION { bbl.and }     { "and" }

FUNCTION { bbl.chapter } { "Chapter" }

FUNCTION { bbl.doi }     { "DOI:" }

FUNCTION { bbl.editor }  { "Ed." }

FUNCTION { bbl.editors } { "Eds." }

FUNCTION { bbl.edition } { "ed." }

FUNCTION { bbl.etal }    { "\latin{et~al.}" }

FUNCTION { bbl.in }      { "In" }

FUNCTION { bbl.inpress } { "in press" }

FUNCTION { bbl.msc }     { "M.Sc.\ thesis" }

FUNCTION { bbl.page }    { "p" }

FUNCTION { bbl.pages }   { "pp" }

FUNCTION { bbl.phd }     { "Ph.D.\ thesis" }

FUNCTION { bbl.version } { "version" }

FUNCTION { bbl.volume }  { "Vol." }

% Functions for number formatting

STRINGS { pages.str }

FUNCTION { hyphen.to.dash } {
  'pages.str :=
  ""
  { pages.str empty$ not }
    {
      pages.str #1 #1 substring$
      "-" =
        {
          "--" *
          {
            pages.str #1 #1 substring$
            "-" =
          }
            { pages.str #2 global.max$ substring$ 'pages.str := }
          while$
        }
        {
          pages.str #1 #1 substring$
          *
          pages.str #2 global.max$ substring$ 'pages.str :=
        }
      if$
    }
  while$
}

INTEGERS { multiresult.bool }

FUNCTION { multi.page.check } {
  'pages.str :=
  #0 'multiresult.bool :=
  {
    multiresult.bool not
    pages.str empty$ not
    and
  }
    {
      pages.str #1 #1 substring$
      duplicate$
      "-" = swap$ duplicate$
      "," = swap$
      "+" =
      or or
        { #1 'multiresult.bool := }
        { pages.str #2 global.max$ substring$ 'pages.str := }
      if$
    }
  while$
  multiresult.bool
}

% Functions for calculating the label data needed by natbib


INTEGERS {
  current.name.int
  names.separate.comma
  names.separate.semicolon
  names.separate.comma.bool
  remaining.names.int
  total.names.int
}

STRINGS {
  current.name.str
  names.str
}

FUNCTION { full.format.names } {
  'names.str :=
  #1 'current.name.int :=
  names.str num.names$ 'remaining.names.int :=
  { remaining.names.int #0 > }
    {
      names.str current.name.int "{vv~}{ll}" format.name$
      current.name.int #1 >
        {
          swap$ add.comma swap$
          remaining.names.int #1 >
            { }
            {
              duplicate$
              "others" =
                { bbl.etal }
                { bbl.and }
              if$
              add.space swap$ *
            }
          if$
          *
        }
        { }
      if$   
      remaining.names.int #1 - 'remaining.names.int :=
      current.name.int #1 + 'current.name.int :=
    }
  while$
}

FUNCTION { full.author } {
  author empty$
    { "" }
    { author full.format.names }
  if$ 
}

FUNCTION { full.author.editor } {
  author empty$
    {
      editor empty$
        { "" }
        { editor full.format.names }
      if$
    }
    { author full.format.names }
  if$ 
}

FUNCTION { full.editor } {
  editor empty$
    { "" }
    { editor full.format.names }
  if$ 
}

FUNCTION { short.format.names } {
  'names.str :=
  names.str #1 "{vv~}{ll}" format.name$
  names.str num.names$
  duplicate$
  #2 >
    {
      pop$
      add.space bbl.etal *
    }
    {
      #2 <
        { }
        {
          names.str #2 "{ff }{vv }{ll}{ jj}" format.name$
          "others" =
            { add.space bbl.etal * }
            {
              add.space
              bbl.and add.space
              *
              names.str #2 "{vv~}{ll}" format.name$
              *
            }
          if$
        }
      if$ 
    }
  if$ 
}

FUNCTION { short.author.key } {
  author empty$
    {
      key empty$
        { cite$ #1 #3 substring$ }
        { key }
      if$ 
    }
    { author short.format.names }
  if$ 
}

FUNCTION { short.author.editor.key } {
  author empty$
    {
      editor empty$
        {
          key empty$
            { cite$ #1 #3 substring$ }
            { key }
          if$ 
        }
        { editor short.format.names }
      if$
    }
    { author short.format.names }
  if$
}

FUNCTION { short.author.key.organization } {
  author empty$
    {
      key empty$
        {
          organization empty$
            { cite$ #1 #3 substring$ }
            {
              organization #1 #4 substring$
              "The " =
                { organization }
                { organization #5 global.max$ substring$ }
              if$
              #3 text.prefix$
            }
          if$ 
        }
        { key }
      if$ 
    }
    { author short.format.names }
  if$ 
}

FUNCTION { short.editor.key.organization } {
  editor empty$
    {
      key empty$
        {
          organization empty$
            { cite$ #1 #3 substring$ }
            {
              organization #1 #4 substring$
              "The " =
                { organization }
                { organization #5 global.max$ substring$ }
              if$
              #3 text.prefix$
            }
          if$ 
        }
        { key }
      if$ 
    }
    { editor short.format.names }
  if$ 
}

FUNCTION { calculate.full.names } {
  type$ "book" =
  type$ "inbook" =
  or
    { full.author.editor }
    {
      type$ "proceedings" =
        { full.editor }
        { full.author }
      if$ 
    }
  if$
}

FUNCTION { calculate.short.names } {
  type$ "book" =
  type$ "inbook" =
  or
    { short.author.editor.key }
    {
      type$ "proceedings" =
        { short.editor.key.organization }
        {
          type$ "manual" =
            { short.author.key.organization }
            { short.author.key }
          if$ 
        }
      if$ 
    }
  if$
  'short.names :=
}

FUNCTION { calculate.names } {
  calculate.short.names
  short.names
  year empty$
    { "()" }
    { "(" year * ")" * }
  if$
  *
  'label :=
}

% Counting up the number of entries

INTEGERS { entries.int }

FUNCTION { initialize.count.entries } {
  #0 'entries.int  :=
}

FUNCTION { count.entries } {
  entries.int #1 + 'entries.int  :=
}

% Start and end of bibliography functions

FUNCTION { begin.bib } {
  preamble$ empty$
    { }
    {
      preamble$ write$
      newline$
    }
  if$
  "\providecommand{\latin}[1]{#1}" write$
  newline$
  "\providecommand*\mcitethebibliography{\thebibliography}" write$
  newline$
  "\csname @ifundefined\endcsname{endmcitethebibliography}" write$
  "  {\let\endmcitethebibliography\endthebibliography}{}" write$
  newline$
  "\begin{mcitethebibliography}{"
    entries.int int.to.str$  * "}" * write$
  newline$
  "\providecommand*\natexlab[1]{#1}" write$
  newline$
  "\providecommand*\mciteSetBstSublistMode[1]{}" write$
  newline$
  "\providecommand*\mciteSetBstMaxWidthForm[2]{}" write$
  newline$
  "\providecommand*\mciteBstWouldAddEndPuncttrue" write$
  newline$
  "  {\def\EndOfBibitem{\unskip.}}" write$
  newline$
  "\providecommand*\mciteBstWouldAddEndPunctfalse" write$
  newline$
  "  {\let\EndOfBibitem\relax}" write$
  newline$
  "\providecommand*\mciteSetBstMidEndSepPunct[3]{}" write$
  newline$
  "\providecommand*\mciteSetBstSublistLabelBeginEnd[3]{}" write$
  newline$
  "\providecommand*\EndOfBibitem{}" write$
  newline$
  "\mciteSetBstSublistMode{f}" write$
  newline$
  "\mciteSetBstMaxWidthForm{subitem}{(\alph{mcitesubitemcount})}" write$
  newline$
  "\mciteSetBstSublistLabelBeginEnd" write$
  newline$
  "  {\mcitemaxwidthsubitemform\space}" write$
  newline$
  "  {\relax}" write$
  newline$
  "  {\relax}" write$
  newline$    
}

FUNCTION { end.bib } {
  newline$
  "\end{mcitethebibliography}" write$
  newline$
}

% Functions used for the special "control" entry type, to pass data
% from LaTeX to BibTeX

INTEGERS {
  ctrl.article.title.bool
  ctrl.chapter.title.bool
  ctrl.etal.firstonly.bool
  ctrl.etal.number.int
}

FUNCTION { initialize.control.values } {
%<*bio>
  #1 'ctrl.article.title.bool :=
%</bio>
%<*!bio>
  #0 'ctrl.article.title.bool :=
%</!bio>
  #0 'ctrl.chapter.title.bool :=
  #1 'ctrl.etal.firstonly.bool :=
  #15 'ctrl.etal.number.int :=
}

FUNCTION { control } {
  ctrl-article-title  yes.no.to.bool 'ctrl.article.title.bool  :=
  ctrl-chapter-title  yes.no.to.bool 'ctrl.chapter.title.bool  :=
  ctrl-etal-firstonly yes.no.to.bool 'ctrl.etal.firstonly.bool :=
  ctrl-etal-number    str.to.int     'ctrl.etal.number.int     :=
  ctrl-use-title empty$
    'skip$
    { ctrl-use-title yes.no.to.bool 'ctrl.article.title.bool  := }
  if$
}

% Functions of each bibitem: tracking punctuation and transferring
% items to the .bbl file

INTEGERS {
  next.punct.comma
  next.punct.period
  next.punct.semicolon
  next.punct.space
}

FUNCTION { initialize.tracker } {
  #0 'next.punct.comma     :=
  #1 'next.punct.period    :=
  #2 'next.punct.semicolon :=
  #3 'next.punct.space     :=
}

INTEGERS { next.punct.int }

FUNCTION { output } {
  swap$
  duplicate$ empty$
    { pop$ }
    {
      next.punct.int next.punct.space =
        { add.space }
        {
          next.punct.int next.punct.comma =
            { add.comma }
            {
              next.punct.int next.punct.semicolon =
                { add.semicolon }
                { add.period }
              if$ 
            }
          if$ 
        }
      if$
      write$
    }
  if$  
  next.punct.comma 'next.punct.int :=
}

% Functions for each bibliography entry: start and finish

FUNCTION { begin.bibitem } {
  newline$
  "\bibitem" write$
  label
  calculate.full.names
  duplicate$
  short.names =
    { pop$ }
    { * }
  if$ 
  "[" swap$ * "]" * write$
  "{" cite$ * "}" * write$
  newline$
  ""
  next.punct.comma 'next.punct.int :=
}

INTEGERS { add.period.length.int }

FUNCTION { would.add.period } {
  duplicate$
  add.period$
  text.length$ 'add.period.length.int :=
  duplicate$
  text.length$
  add.period.length.int =
    { #0 }
    { #1 }
  if$
}

FUNCTION { end.bibitem } {
  would.add.period
    {
      "\relax" * write$
      newline$
      "\mciteBstWouldAddEndPuncttrue" write$
      newline$
      "\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}" write$
      newline$
      "{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax"
    }
    {
      "\relax" * write$
      newline$
      "\mciteBstWouldAddEndPunctfalse" write$
       newline$
      "\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}" write$
      newline$
      "{}{\mcitedefaultseppunct}\relax"
    }
  if$
  write$
  newline$
  "\EndOfBibitem" write$
}

% Formatting names: authors and editors are not quite the same,
% and there is the question of how to handle 'et al.'

FUNCTION { initialize.name.separator } {
  #1 'names.separate.comma     :=
  #0 'names.separate.semicolon :=
}

FUNCTION { format.names.loop } {
  { remaining.names.int #0 > }
    {
      names.str current.name.int "{vv~}{ll,}{~f.}{,~jj}" format.name$
      duplicate$
      'current.name.str :=
      current.name.int #1 >
        {
          duplicate$
          "others," =
            {
              bbl.etal
              add.space
              remaining.names.int #1 - 'remaining.names.int :=
            }
            { 
              swap$
              names.separate.comma.bool
                { add.comma }
                { add.semicolon } 
              if$
%<*bio>
              remaining.names.int #1 >
                { }
                { bbl.and add.space * }
              if$ 
%</bio>s
              swap$
              *
            }
          if$  
        }
        { }
      if$   
      remaining.names.int #1 - 'remaining.names.int :=
      current.name.int #1 + 'current.name.int :=
    }
  while$
}

FUNCTION { format.names.all } {
  total.names.int 'remaining.names.int :=
  format.names.loop
}

FUNCTION { format.names.etal } {
  ctrl.etal.firstonly.bool
    { #1 'remaining.names.int := }
    { ctrl.etal.number.int 'remaining.names.int := }
  if$ 
  format.names.loop
  current.name.str "others," =
    { }
    {
      add.space
      bbl.etal
      add.space
      *
    }
  if$ 
}

FUNCTION { format.names } {
  'names.separate.comma.bool :=
  'names.str :=
  #1 'current.name.int :=
  names.str num.names$ 'total.names.int :=
  total.names.int ctrl.etal.number.int >
    {
      ctrl.etal.number.int #0 =
        { format.names.all }
        { format.names.etal }
      if$ 
    }
    { format.names.all }
  if$ 
}

% Converting editions into their fixed representations

FUNCTION { bbl.first }  { "1st" }

FUNCTION { bbl.second } { "2nd" }

FUNCTION { bbl.third }  { "3rd" }

FUNCTION { bbl.fourth } { "4th" }

FUNCTION { bbl.fifth }  { "5th" }

FUNCTION { bbl.st }     { "st" }

FUNCTION { bbl.nd }     { "nd" }

FUNCTION { bbl.rd }     { "rd" }

FUNCTION { bbl.th }     { "th" }

STRINGS {
  ord.input.str
  ord.output.str
}

FUNCTION { make.ordinal } {
  duplicate$
  "1" swap$
  *
  #-2 #1 substring$
  "1" =
    {
      bbl.th *
    }
    {
      duplicate$
      #-1 #1 substring$
      duplicate$
      "1" =
        {
          pop$
          bbl.st *
        }
        {
          duplicate$
          "2" =
            {
              pop$
              bbl.nd *
            }
            {
              "3" =
                { bbl.rd * }
                { bbl.th * }
              if$ 
            }
          if$
        }
      if$
    }
  if$ 
}

FUNCTION { convert.to.ordinal } {
  extract.number
  "l" change.case$ 'ord.input.str :=
  ord.input.str "first" = ord.input.str "1" = or
    { bbl.first 'ord.output.str := }
    {
      ord.input.str "second" = ord.input.str "2" = or
        { bbl.second 'ord.output.str := }
        {
          ord.input.str "third" = ord.input.str "3" = or
            { bbl.third 'ord.output.str := }
            {
              ord.input.str "fourth" = ord.input.str "4" = or
                { bbl.fourth 'ord.output.str := }
                {
                  ord.input.str "fifth" = ord.input.str "5" = or
                    { bbl.fifth 'ord.output.str := }
                    {
                      ord.input.str #1 #1 substring$
                      is.a.number
                        { ord.input.str make.ordinal }
                        { ord.input.str }
                      if$
                      'ord.output.str :=
                    }
                   if$
                }
              if$ 
            }
          if$ 
        }
      if$ 
    }
  if$
  ord.output.str
}

% Functions for each type of entry

FUNCTION { format.address } {
  address empty$
    { }
    {
      address
      output
    }
  if$
}

FUNCTION { format.authors } {
  author empty$
    { }
    {
%<*bio>
      author names.separate.comma format.names
%</bio>
%<*!bio>
      author names.separate.semicolon format.names
%</!bio>
      output
      next.punct.space 'next.punct.int :=
    }
  if$   
}

FUNCTION { format.editors } {
  editor empty$
    { }
    {
      editor names.separate.comma format.names
      add.comma
      editor num.names$ #1 >
        { bbl.editors }
        { bbl.editor }
      if$ 
      *
      output
      next.punct.semicolon 'next.punct.int :=
    } 
  if$ 
}

FUNCTION { format.authors.or.editors } {
  author empty$
    { format.editors }
    { format.authors }
  if$ 
  next.punct.space 'next.punct.int :=
}

FUNCTION { format.chapter } {
  chapter empty$
    { }
    {
      bbl.chapter add.space
      chapter
      *
      output
    }
  if$
}

FUNCTION { format.doi } {
  next.punct.comma 'next.punct.int :=
  bbl.doi add.space
  doi *
  output
}

FUNCTION { format.edition } {
  edition empty$
    { }
    {
      edition convert.to.ordinal
      add.space bbl.edition *
      output
    }
  if$ 
  next.punct.semicolon 'next.punct.int :=
}

FUNCTION { format.group.address } {
  duplicate$
  empty$
    { pop$ }
    {
      address empty$
        { }
        {
          add.colon
          address
          *
        }
      if$ 
      output
    }
  if$ 
}

FUNCTION { format.howpublished } {
  howpublished empty$
    { }
    {
      howpublished
      output
    }
  if$
}

FUNCTION { format.journal } {
  journal emph
  output
  next.punct.space 'next.punct.int :=
}

FUNCTION { format.journal.unpub } {
  journal emph
  output
}

FUNCTION { format.note } {
  note empty$
    { }
    {
      note
      output
    }
  if$ 
}

FUNCTION { format.number.series } {
  series empty$
    { }
    {
      series
      number empty$
        { }
        {
          add.space
          number *
        }
      if$ 
      output
      next.punct.semicolon 'next.punct.int :=
    }
  if$ 
}


FUNCTION { format.organization } {
  organization empty$
    { }
    {
      organization paren
      output
      next.punct.period 'next.punct.int :=
    }
  if$ 
}

FUNCTION { format.organization.address } {
  organization format.group.address
}

FUNCTION { format.pages } {
  pages empty$
    { }
    {
      pages multi.page.check
        {
          bbl.pages
          pages hyphen.to.dash
        }
        { bbl.page pages }
      if$
      tie.or.space.connect
      output
    }
  if$
}

FUNCTION { format.pages.article } {
  pages empty$
    { }
    {
      pages hyphen.to.dash
      output
    }
  if$
}

FUNCTION { format.publisher.address } {
  publisher format.group.address
}

FUNCTION { format.school.address } { 
  school
  duplicate$
  empty$
    { pop$ }
    {
      address empty$
        { }
        {
          add.comma
          address
          *
        }
      if$ 
      output
    }
  if$
}

FUNCTION { format.title } {
  title empty$
    { }
    {
      title
      output
      next.punct.period 'next.punct.int :=
    }
  if$
}

FUNCTION { format.title.article } {
  ctrl.article.title.bool
    {
      title empty$
        { }
        {
          title
          output
          next.punct.period 'next.punct.int :=
        }
      if$ 
    }
    { }
  if$
}

FUNCTION { format.title.techreport } {
  title empty$
    { }
    {
      title emph
      output
      next.punct.semicolon 'next.punct.int :=
    }
  if$
}

FUNCTION { format.title.booktitle } {
  title empty$
    { }
    {
      title
      output
      next.punct.period 'next.punct.int :=
    }
  if$ 
  booktitle empty$
    { }
    {
      booktitle
      output
      next.punct.period 'next.punct.int :=
    }
  if$   
}


FUNCTION { format.chapter.title } {
}


STRINGS {
  book.title
  chapter.title
}

FUNCTION { format.title.booktitle.book } {
  "" 'chapter.title :=
  booktitle empty$
    {
      "" 'chapter.title :=
      title 'book.title :=
    }
    {
      ctrl.chapter.title.bool
        {
          title empty$
            'skip$
            { title 'chapter.title := }
          if$
        }
        'skip$
      if$
      maintitle empty$
        { booktitle 'book.title := }
        { maintitle add.period booktitle * 'book.title := }
      if$ 
    }
  if$
  chapter.title empty$
    { }
    {
      chapter.title
      output
      next.punct.period 'next.punct.int :=
    }
  if$ 
  book.title emph
  chapter.title empty$
    {
      author empty$
        { }
        {
          editor empty$
            { }
            { bbl.in add.space swap$ * }
          if$  
        }
      if$ 
    }
    { bbl.in add.space swap$ * }
  if$ 
  output
}

FUNCTION { format.type } {
  type empty$
    { }
    {
      pop$
      type
    }
  if$
  output
}

FUNCTION { format.type.number } {
  type empty$
    { }
    {
      type
      number empty$
        { }
        { number tie.or.space.connect }
      if$ 
      output
    }
  if$
}

FUNCTION { format.url } {
  url empty$
    { }
    {
      "\url{" url * "}" *
      output
    }
  if$ 
}

FUNCTION { format.year } {
  year empty$
    { }
    {
      year
      output
      next.punct.semicolon 'next.punct.int :=
    }
  if$ 
}

FUNCTION { format.year.article } {
  year empty$
    { }
    {
%<*bio>
      year paren
      output
      next.punct.space 'next.punct.int :=
%</bio>
%<*!bio>
      year bold
      output
%</!bio>
    }
  if$
}

FUNCTION { format.version } {
  version empty$
    { }
    {
      bbl.version add.space
      version
      *
      output
    } 
  if$ 
}

FUNCTION { format.volume.article } {
  volume emph
  output
}

FUNCTION { format.volume } {
  volume empty$
    { }
    {
      bbl.volume
      volume
      tie.or.space.connect
      output
      next.punct.semicolon 'next.punct.int :=
    }
  if$   
}

% The functions to deal with each entry type

FUNCTION { article } {
  begin.bibitem
  format.authors
%<*bio>
  format.year.article
%</bio>
  format.title.article
  format.journal
%<*!bio>
  format.year.article
%</!bio>
  format.volume.article
  format.pages.article
  format.note
  end.bibitem
}

FUNCTION { book } {
  begin.bibitem
  format.authors.or.editors
  format.title.booktitle.book
  format.edition
  author empty$
    { }
    { format.editors }
  if$
  format.number.series
  format.publisher.address
  format.year
  format.volume
  format.chapter
  format.pages
  format.note
  end.bibitem
}

FUNCTION { inbook } { book }

FUNCTION { booklet } {
  begin.bibitem
  format.authors
  format.title
  format.howpublished
  format.address
  format.year
  format.note
  end.bibitem
}

FUNCTION { collection } { book }

FUNCTION { incollection } { book }

FUNCTION { inpress } {
  begin.bibitem
  format.authors
  format.journal.unpub
  doi top$
  doi empty$
    {
      bbl.inpress
      output
    }
    {
      format.year
      format.doi
    }
  if$ 
  format.note
  end.bibitem
}

FUNCTION { inproceedings } {
  begin.bibitem
  format.authors
  format.title.booktitle
  format.address
  format.year
  format.pages
  format.note
  end.bibitem
}

FUNCTION { manual } {
  begin.bibitem
  format.authors
  format.title
  format.version
  format.organization.address
  format.year
  format.note
  end.bibitem
}

FUNCTION { mastersthesis } {
  begin.bibitem
  format.authors
  format.title
  bbl.msc format.type
  format.school.address
  format.year
  format.note
  end.bibitem
}

FUNCTION { misc } {
  begin.bibitem
  format.authors
  format.title
  format.howpublished
  format.year
  format.url
  format.note
  end.bibitem
}

FUNCTION { patent } {
  begin.bibitem
  format.authors
  format.organization
  format.title
  format.type.number
  format.year
  format.note
  end.bibitem
}

FUNCTION { phdthesis } {
  begin.bibitem
  format.authors
  format.title
  bbl.phd format.type
  format.school.address
  format.year
  format.note
  end.bibitem
}

FUNCTION { proceeding } {
  begin.bibitem
  format.title
  format.address
  format.year
  format.pages
  format.note
  end.bibitem
}

FUNCTION { techreport } {
  begin.bibitem
  format.authors.or.editors
  format.title.techreport
  format.type.number
  format.organization.address
  format.year
  format.volume
  format.pages
  format.note
  end.bibitem
}

FUNCTION { unpublished } {
  begin.bibitem
  format.authors
  format.journal.unpub
  doi empty$
    { format.howpublished }
    {
      format.year
      format.doi
    }
  if$ 
  format.note
  end.bibitem
}

FUNCTION { default.type } { misc }
 
% Macros containing pre-defined short cuts

MACRO { jan } { "Jan." }
MACRO { feb } { "Feb." }
MACRO { mar } { "Mar." }
MACRO { apr } { "Apr." }
MACRO { may } { "May" }
MACRO { jun } { "June" }
MACRO { jul } { "July" }
MACRO { aug } { "Aug." }
MACRO { sep } { "Sept." }
MACRO { oct } { "Oct." }
MACRO { nov } { "Nov." }
MACRO { dec } { "Dec." }

MACRO { acbcct } { "ACS Chem.\ Biol." }
MACRO { achre4 } { "Acc.\ Chem.\ Res." }
MACRO { acncdm } { "ACS Chem.\ Neurosci." }
MACRO { ancac3 } { "ACS Nano" }
MACRO { ancham } { "Anal.\ Chem." }
MACRO { bichaw } { "Biochemistry" }
MACRO { bcches } { "Bioconjugate Chem." }
MACRO { bomaf6 } { "Biomacromolecules" }
MACRO { bipret } { "Biotechnol.\ Prog." }
MACRO { crtoec } { "Chem.\ Res.\ Toxicol." }
MACRO { chreay } { "Chem.\ Rev." }
MACRO { cmatex } { "Chem.\ Mater." }
MACRO { cgdefu } { "Cryst.\ Growth Des." }
MACRO { enfuem } { "Energy Fuels" }
MACRO { esthag } { "Environ.\ Sci.\ Technol." }
MACRO { iechad } { "Ind.\ Eng.\ Chem.\ Res." }
MACRO { inoraj } { "Inorg.\ Chem." }
MACRO { jafcau } { "J.~Agric.\ Food Chem." }
MACRO { jceaax } { "J.~Chem.\ Eng.\ Data" }
MACRO { jceda8 } { "J.~Chem.\ Ed." }
MACRO { jcisd8 } { "J.~Chem.\ Inf.\ Model." }
MACRO { jctcce } { "J.~Chem.\ Theory Comput." }
MACRO { jcchff } { "J. Comb. Chem." }
MACRO { jmcmar } { "J. Med. Chem." }
MACRO { jnprdf } { "J. Nat. Prod." }
MACRO { joceah } { "J.~Org.\ Chem." }
MACRO { jpcafh } { "J.~Phys.\ Chem.~A" }
MACRO { jpcbfk } { "J.~Phys.\ Chem.~B" }
MACRO { jpccck } { "J.~Phys.\ Chem.~C" }
MACRO { jpclcd } { "J.~Phys.\ Chem.\ Lett." }
MACRO { jprobs } { "J.~Proteome Res." }
MACRO { jacsat } { "J.~Am.\ Chem.\ Soc." }
MACRO { langd5 } { "Langmuir" }
MACRO { mamobx } { "Macromolecules" }
MACRO { mpohbp } { "Mol.\ Pharm." }
MACRO { nalefd } { "Nano Lett." }
MACRO { orlef7 } { "Org.\ Lett." }
MACRO { oprdfk } { "Org.\ Proc.\ Res.\ Dev." }
MACRO { orgnd7 } { "Organometallics" }
 
% Construction of bibliography: reading of data, construction of
% labels, output of formatted bibliography

READ

EXECUTE { initialize.control.values }

EXECUTE { initialize.count.entries }

EXECUTE { initialize.name.separator }

EXECUTE { initialize.tracker }

ITERATE { calculate.names }

ITERATE { count.entries }

EXECUTE { begin.bib }

ITERATE { call.type$ }

EXECUTE { end.bib }
%</bst>
%<*bib>
@ARTICLE{Abernethy2003,
  author = {Colin D. Abernethy and Gareth M. Codd and Mark D. Spicer
    and Michelle K. Taylor},
  title = {{A} highly stable {N}-heterocyclic carbene complex of
    trichloro-oxo-vanadium(\textsc{v}) displaying novel
    {C}l---{C}(carbene) bonding interactions},
  journal = {{J}. {A}m. {C}hem. {S}oc.},
  year = {2003},
  volume = {125},
  pages = {1128--1129},
  number = {5},
  doi = {10.1021/ja0276321},
}

@MISC{ACS2007,
  url = {http://pubs.acs.org/books/references.shtml},
}

@ARTICLE{Arduengo1992,
  author = {Arduengo, III, Anthony J. and H. V. Rasika Dias and
    Richard L. Harlow and Michael Kline},
  title = {{E}lectronic stabilization of nucleophilic carbenes},
  journal = {{J}.~{A}m.\ {C}hem.\ {S}oc.},
  year = {1992},
  volume = {114},
  pages = {5530--5534},
  number = {14},
  doi = {10.1021/ja00040a007},
}

@ARTICLE{Arduengo1994,
  author = {Arduengo, III, Anthony J. and Siegfried F. Gamper and
    Joseph C. Calabrese	and Fredric Davidson},
  title = {{L}ow-coordinate carbene complexes of nickel(0) and
    platinum(0)},
  journal = jacsat,
  year = {1994},
  volume = {116},
  pages = {4391--4394},
  number = {10},
  doi = {10.1021/ja00089a029},
}

@ARTICLE{Eisenstein2005,
  author = {Appelhans, Leah N. and Zuccaccia, Daniele and Kovacevic,
    Anes and Chianese, Anthony R. and Miecznikowski, John R. and
    Macchioni, Aleco and Clot, Eric and Eisenstein, Odile and
    Crabtree, Robert H.},
  title = {{A}n anion-dependent switch in selectivity results from a
    change of {C}---{H} activation mechanism in the reaction of an
    imidazolium salt with \ce{IrH5(PPh3)2}},
  journal = {{J}.~{A}m.\ {C}hem. {S}oc.},
  year = {2005},
  volume = {127},
  pages = {16299--16311},
  number = {46},
  doi = {10.1021/ja055317j},
}

@BOOK{Coghill2006,
  title = {{T}he {ACS} {S}tyle {G}uide},
  publisher = {{O}xford {U}niversity {P}ress, {I}nc. and
               {T}he {A}merican {C}hemical {S}ociety},
  year = {2006},
  editor = {Coghill, Anne M. and Garson, Lorrin R.},
  address = {{N}ew {Y}ork},
  edition = {3},
  subtitle = {{E}ffective {C}ommunication of {S}cientific
    {I}nformation},
}

@BOOK{Cotton1999,
  title = {{A}dvanced {I}norganic {C}hemistry},
  publisher = {Wiley},
  year = {1999},
  author = {Cotton, Frank Albert and Wilkinson, Geoffrey and
    Murillio, Carlos A. and Bochmann, Manfred},
  address = {Chichester, United Kingdom},
  edition = {6},
}

@TECHREPORT{EuropeanCommission2008,
  address = {Brussels, Belgium},
  organization = {European Commission},
  title = {Communication from the European Commission to the
   European Council and the European Parliament:
   20 20 by 2020: Europe's climate change opportunity},
  year = {2008}
}

@INBOOK{Friedman-Hill2003,
  author         = {E. Friedman-Hill},
  booktitle      = {{J}ess in {A}ction: {J}ava {R}ule-based {S}ystems},
  publisher      = {Manning Publications Co.},
  address        = {Greenwich, CT, USA},
  title          = {Writing Rules in Jess},
  edition        = {1},
  year           = {2003}
}

@PATENT{Johnson1972,
  author       = {Johnson, Alexander Lawrence},
  organization = {E.~I.~du Pont de Nemours},
  number       = {3637731},
  title        = {1-(Alkylsubstituted phenyl)imidazoles useful in ACTH
    reverse assay},
  type         = {US~Patent},
  year         = {1972}
}

@MANUAL{Pople2003,
  title = {{G}aussian 03},
  author = {M.~J. Frisch and G.~W. Trucks and H.~B. Schlegel and G.~E. Scuseria
	and M.~A. Robb and J.~R. Cheeseman and Montgomery and Jr. and J.
	A. and T. Vreven and K.~N. Kudin and J.~C. Burant and J.~M. Millam
	and S.~S. Iyengar and J. Tomasi and V. Barone and B. Mennucci and
	M. Cossi and G. Scalmani and N. Rega and G.~A. Petersson and H. Nakatsuji
	and M. Hada and M. Ehara and K. Toyota and R. Fukuda and J. Hasegawa
	and M. Ishida and T. Nakajima and Y. Honda and O. Kitao and H. Nakai
	and M. Klene and X. Li and J.~E. Knox and H.~P. Hratchian and J.~B.
	Cross and V. Bakken and C. Adamo and J. Jaramillo and R. Gomperts
	and R.~E. Stratmann and O. Yazyev and A.~J. Austin and R. Cammi and
	C. Pomelli and J.~W. Ochterski and P.~Y. Ayala and K. Morokuma and
	G.~A. Voth and P. Salvador and J.~J. Dannenberg and V.~G. Zakrzewski
	and S. Dapprich and A.~D. Daniels and M.~C. Strain and O. Farkas
	and D.~K. Malick and A.~D. Rabuck and K. Raghavachari and J.~B. Foresman
	and J.~V. Ortiz and Q. Cui and A.~G. Baboul and S. Clifford and J.
	Cioslowski and B.~B. Stefanov and G. Liu and A. Liashenko and P.
	Piskorz and I. Komaromi and R.~L. Martin and D.~J. Fox and T. Keith
	and M.~A. Al-Laham and C.~Y. Peng and A. Nanayakkara and M. Challacombe
	and P.~M.~W. Gill and B. Johnson and W. Chen and M.~W. Wong and C.
	Gonzalez and J.~A. Pople},
  organization = {Gaussian, Inc.},
  address = {Wallingford, CT},
  year = {2004},
  howpublished = {Gaussian, Inc., Wallingford, CT, USA},
  institution = {Gaussian, Inc.},
  publisher = {Gaussian, Inc.}
}

@ARTICLE{Mena2000,
  author = {Angel Abarca and Pilar G\'omez-Sal and Avelino Mart\'in
    and Miguel Mena and Josep Mar\'ia Poblet and Carlos Y\'elamos},
  title = {{A}mmonolysis of mono(pentamethylcyclopentadienyl)
    titanium(\textsc{iv}) derivatives},
  journal = {Inorg. Chem.},
  year = {2000},
  volume = {39},
  pages = {642--651},
  number = {4},
  doi = {10.1021/ic9907718},
}
%</bib>
%\fi